fix: latest customer data selection and button margin
This commit is contained in:
parent
68c635ce38
commit
b77b732bcb
5 changed files with 58 additions and 34 deletions
|
|
@ -29,11 +29,13 @@ const resolvers = {
|
|||
replacePhoto: async (root, { customerId, photoType, newPhoto }, context) => {
|
||||
const token = !!context.req.cookies.lid && context.req.session.user.id
|
||||
const photo = await newPhoto
|
||||
if (!photo) return customers.getCustomerById(customerId)
|
||||
return customers.updateEditedPhoto(customerId, photo, photoType)
|
||||
.then(newPatch => customers.edit(customerId, newPatch, token))
|
||||
},
|
||||
deleteEditedData: (root, { customerId, customerEdit }) => {
|
||||
return customers.deleteEditedData(customerId, customerEdit)
|
||||
// NOT IMPLEMENTING THIS FEATURE FOR THE CURRENT VERSION
|
||||
return customers.getCustomerById(customerId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue