fix: customer action identifier
This commit is contained in:
parent
e1c9cdd586
commit
41f3f7f28f
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ const resolvers = {
|
||||||
},
|
},
|
||||||
Mutation: {
|
Mutation: {
|
||||||
setCustomer: (root, { customerId, customerInput }, context, info) => {
|
setCustomer: (root, { customerId, customerInput }, context, info) => {
|
||||||
const token = context.req.cookies && context.req.cookies.token
|
const token = !!context.req.cookies.lid && context.req.session.user.id
|
||||||
if (customerId === anonymous.uuid) return customers.getCustomerById(customerId)
|
if (customerId === anonymous.uuid) return customers.getCustomerById(customerId)
|
||||||
return customers.updateCustomer(customerId, customerInput, token)
|
return customers.updateCustomer(customerId, customerInput, token)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue