Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelecerati committed Aug 27, 2024
1 parent ba44679 commit 45f2b28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/controllers/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,9 @@ app.post(
...(profiles ? { profiles } : null), // avoid serializing null profiles on the task
},
},
req.project?.id,
null,
asset,
req.project?.id,
);

res.json({ url, tusEndpoint, asset, task: { id: task.id } });
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/task/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,11 @@ export class TaskScheduler {
const task = await this.createTask(
type,
params,
projectId,
inputAsset,
outputAsset,
userId,
requesterId,
projectId,
);

if (user?.disabled) {
Expand All @@ -379,11 +379,11 @@ export class TaskScheduler {
async createTask(
type: Task["type"],
params: Task["params"],
projectId: string,
inputAsset?: Asset,
outputAsset?: Asset,
userId?: string,
requesterId?: string,
projectId?: string,
) {
const uId = inputAsset?.userId || outputAsset?.userId || userId;
const user = await db.user.get(uId, { useCache: true });
Expand Down

0 comments on commit 45f2b28

Please sign in to comment.