fix: refs #6776 add userId
gitea/salix/pipeline/head There was a failure building this commit Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-01-30 16:05:56 +01:00
parent afa34c6296
commit 5690da0a18
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
module.exports = Self => {
Self.remoteMethod('makeMulti', {
Self.remoteMethodCtx('makeMulti', {
description: 'Add a record or update it if it already exists.',
accessType: 'WRITE',
accepts: [{
@ -25,8 +25,8 @@ module.exports = Self => {
}
});
Self.makeMulti = async(shelvingFk, items, warehouseFk, options) => {
const myOptions = {};
Self.makeMulti = async(ctx, shelvingFk, items, warehouseFk, options) => {
const myOptions = {userId: ctx.req.accessToken.userId};
let tx;
if (typeof options == 'object')