Skip to content

Commit

Permalink
api/stream: Allow admins to use API key to patch stream (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges authored Apr 29, 2024
1 parent 67decac commit a109bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/controllers/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ app.patch(
const stream = await db.stream.get(id);

const exists = stream && !stream.deleted;
const hasAccess = stream?.userId === req.user.id || req.isUIAdmin;
const hasAccess = stream?.userId === req.user.id || req.user.admin;
if (!exists || !hasAccess) {
res.status(404);
return res.json({ errors: ["not found"] });
Expand Down

0 comments on commit a109bbe

Please sign in to comment.