feat: add edit, delete and image input
This commit is contained in:
parent
421543f0c7
commit
3de7ae2fe9
12 changed files with 545 additions and 139 deletions
|
|
@ -19,7 +19,14 @@ const resolvers = {
|
|||
},
|
||||
addCustomField: (...[, { customerId, label, value }]) => customers.addCustomField(customerId, label, value),
|
||||
saveCustomField: (...[, { customerId, fieldId, newValue }]) => customers.saveCustomField(customerId, fieldId, newValue),
|
||||
removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId)
|
||||
removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId),
|
||||
editCustomer: (root, { customerId, customerEdit }, context) => {
|
||||
const token = !!context.req.cookies.lid && context.req.session.user.id
|
||||
return customers.edit(customerId, customerEdit, token)
|
||||
},
|
||||
deleteEditedData: (root, { customerId, customerEdit }) => {
|
||||
return customers.deleteEditedData(customerId, customerEdit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue