refactor: drop getItemPackingType refs #6276
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-01-04 12:44:44 +01:00
parent da8057e4c7
commit 3ebf0a30a9
1 changed files with 0 additions and 31 deletions

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
};
};
};