Remove all logs from api

This commit is contained in:
Kurt Hutten
2021-06-19 07:54:21 +10:00
parent 7f588ebedf
commit 13b5d9c108
3 changed files with 3 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import { createUserInsecure } from 'src/services/users/users.js'
import { db } from 'src/lib/db' import { db } from 'src/lib/db'
import { sentryWrapper } from 'src/lib/sentry' import { sentryWrapper } from 'src/lib/sentry'
import { enforceAlphaNumeric, generateUniqueString } from 'src/services/helpers' import { enforceAlphaNumeric, generateUniqueString } from 'src/services/helpers'
// import 'graphql-tag'
const unWrappedHandler = async (req, _context) => { const unWrappedHandler = async (req, _context) => {
const body = JSON.parse(req.body) const body = JSON.parse(req.body)

View File

@@ -20,7 +20,7 @@ export const foreignKeyReplacement = (input) => {
} }
export const enforceAlphaNumeric = (string) => export const enforceAlphaNumeric = (string) =>
string.replace(/([^a-zA-Z\d_:])/g, '-') (string || '').replace(/([^a-zA-Z\d_:])/g, '-')
export const generateUniqueString = async ( export const generateUniqueString = async (
seed, seed,

View File

@@ -83,7 +83,7 @@ export const updatePart = async ({ id, input }) => {
where: { id }, where: { id },
}) })
if (imageToDestroy) { if (imageToDestroy) {
console.log(`image destroyed, publicId: ${imageToDestroy}, partId: ${id}`) // console.log(`image destroyed, publicId: ${imageToDestroy}, partId: ${id}`)
// destroy after the db has been updated // destroy after the db has been updated
destroyImage({ publicId: imageToDestroy }) destroyImage({ publicId: imageToDestroy })
} }