#6276 createNewWarehouse methods migrated from silex to salix #1850

Merged
jorgep merged 158 commits from 6276-createNewWarehouse into dev 2024-03-06 11:32:11 +00:00
1 changed files with 0 additions and 31 deletions
Showing only changes of commit 3ebf0a30a9 - Show all commits

View File

@ -1,31 +0,0 @@
module.exports = Self => {
Self.remoteMethodCtx('getItemPackingType', {
description: 'Retrieve the operator items',
accessType: 'READ',
returns: {
type: 'object',
},
http: {
path: `/getItemPackingType`,
verb: 'GET'
},
});
Self.getItemPackingType = async ctx => {
const userId = 9 ?? ctx.req.accessToken.userId;
const result = await Self.findOne({
where: {
workerFk: userId
},
include: {
relation: 'itemPackingType',
}
});
const itemPackingType = result.itemPackingType();
return {
description: itemPackingType?.description
};
};
};