chore: graphql libs

This commit is contained in:
Rafael Taranto 2025-04-11 09:46:44 +01:00
parent 3805e989c5
commit 2b3378c722
80 changed files with 1641 additions and 1294 deletions

View file

@ -34,7 +34,8 @@ const resolvers = {
},
replacePhoto: async (root, { customerId, photoType, newPhoto }, context) => {
const token = authentication.getToken(context)
const photo = await newPhoto
const { file } = newPhoto
const photo = await file
if (!photo) return customers.getCustomerById(customerId)
return customers.updateEditedPhoto(customerId, photo, photoType)
.then(newPatch => customers.edit(customerId, newPatch, token))