refactor: improve TODOs readability
This commit is contained in:
parent
b995b549b4
commit
0dff055b05
2 changed files with 5 additions and 5 deletions
|
|
@ -231,7 +231,7 @@ function enhanceEditedPhotos (fields) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function deleteEditedData (id, data) {
|
function deleteEditedData (id, data) {
|
||||||
// NOT IMPLEMENTING THIS FEATURE FOR THE CURRENT VERSION
|
// TODO: NOT IMPLEMENTING THIS FEATURE FOR THE CURRENT VERSION
|
||||||
const defaults = [
|
const defaults = [
|
||||||
'front_camera',
|
'front_camera',
|
||||||
'id_card_data',
|
'id_card_data',
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const resolvers = {
|
||||||
},
|
},
|
||||||
Mutation: {
|
Mutation: {
|
||||||
setCustomer: (root, { customerId, customerInput }, context, info) => {
|
setCustomer: (root, { customerId, customerInput }, context, info) => {
|
||||||
// To be replaced by function that fetchs the token
|
// TODO: To be replaced by function that fetchs the token
|
||||||
const token = !!context.req.cookies.lamassu_sid && context.req.session.user.id
|
const token = !!context.req.cookies.lamassu_sid && 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)
|
||||||
|
|
@ -23,13 +23,13 @@ const resolvers = {
|
||||||
saveCustomField: (...[, { customerId, fieldId, newValue }]) => customers.saveCustomField(customerId, fieldId, newValue),
|
saveCustomField: (...[, { customerId, fieldId, newValue }]) => customers.saveCustomField(customerId, fieldId, newValue),
|
||||||
removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId),
|
removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId),
|
||||||
editCustomer: async (root, { customerId, customerEdit }, context) => {
|
editCustomer: async (root, { customerId, customerEdit }, context) => {
|
||||||
// To be replaced by function that fetchs the token
|
// TODO: To be replaced by function that fetchs the token
|
||||||
const token = !!context.req.cookies.lid && context.req.session.user.id
|
const token = !!context.req.cookies.lid && context.req.session.user.id
|
||||||
const editedData = await customerEdit
|
const editedData = await customerEdit
|
||||||
return customers.edit(customerId, editedData, token)
|
return customers.edit(customerId, editedData, token)
|
||||||
},
|
},
|
||||||
replacePhoto: async (root, { customerId, photoType, newPhoto }, context) => {
|
replacePhoto: async (root, { customerId, photoType, newPhoto }, context) => {
|
||||||
// To be replaced by function that fetchs the token
|
// TODO: To be replaced by function that fetchs the token
|
||||||
const token = !!context.req.cookies.lid && context.req.session.user.id
|
const token = !!context.req.cookies.lid && context.req.session.user.id
|
||||||
const photo = await newPhoto
|
const photo = await newPhoto
|
||||||
if (!photo) return customers.getCustomerById(customerId)
|
if (!photo) return customers.getCustomerById(customerId)
|
||||||
|
|
@ -37,7 +37,7 @@ const resolvers = {
|
||||||
.then(newPatch => customers.edit(customerId, newPatch, token))
|
.then(newPatch => customers.edit(customerId, newPatch, token))
|
||||||
},
|
},
|
||||||
deleteEditedData: (root, { customerId, customerEdit }) => {
|
deleteEditedData: (root, { customerId, customerEdit }) => {
|
||||||
// NOT IMPLEMENTING THIS FEATURE FOR THE CURRENT VERSION
|
// TODO: NOT IMPLEMENTING THIS FEATURE FOR THE CURRENT VERSION
|
||||||
return customers.getCustomerById(customerId)
|
return customers.getCustomerById(customerId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue