fix: refs #7028 fix tback findById

This commit is contained in:
Carlos Satorres 2024-12-12 10:04:31 +01:00
parent 43697eaba7
commit 1970b9c0db
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ module.exports = Self => {
try {
const userId = ctx.req.accessToken.userId;
const worker = await models.Worker.findById({where: {id: userId}}, myOptions);
const worker = await models.Worker.findById(userId, myOptions);
if (!worker) throw new Error('Worker not found');
const params = {