Client Address: Change default address
This commit is contained in:
parent
ea001f44b1
commit
64497d70e1
|
@ -51,15 +51,8 @@ module.exports = function(Self) {
|
|||
next();
|
||||
}
|
||||
|
||||
function getData(ctx) {
|
||||
if (ctx.data)
|
||||
return ctx.data;
|
||||
else
|
||||
return ctx.instance;
|
||||
}
|
||||
|
||||
function removeAllDefault(client, next) {
|
||||
Self.updateAll({clientFk: client.id, isDefaultAddress: true}, {isDefaultAddress: false}, next);
|
||||
Self.updateAll({clientFk: client.id, isDefaultAddress: {neq: 0}}, {isDefaultAddress: false}, next);
|
||||
}
|
||||
|
||||
function generateErrorDefaultAddress() {
|
||||
|
|
Loading…
Reference in New Issue