refactor: drop getItemPackingType refs #6276
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
da8057e4c7
commit
3ebf0a30a9
|
@ -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
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue