Skip to content

Commit

Permalink
refactor: Add write permission for sender in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelink committed Jun 3, 2024
1 parent 6451404 commit 792b18d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export default async ({ req, res, log, error }) => {
roomId: roomId,
messageId: req.body.$id,
},
[`read("user:${req.body.sender}")`]
[
`read("user:${req.body.sender}")`,
`write("user:${req.body.sender}")`,
]
);

log(`Successfully created copilot document: ${copilotDoc.$id}`);
Expand Down

0 comments on commit 792b18d

Please sign in to comment.