mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🔒 Correctly check for note ownership when editing
This commit is contained in:
parent
653cf712ea
commit
9682cd0f99
10 changed files with 40 additions and 36 deletions
|
|
@ -81,7 +81,7 @@ export default apiRoute((app) =>
|
|||
foundAuthor = foundObject ? foundObject.author : null;
|
||||
|
||||
if (foundObject) {
|
||||
if (!foundObject.isViewableByUser(null)) {
|
||||
if (!(await foundObject.isViewableByUser(null))) {
|
||||
return context.json({ error: "Object not found" }, 404);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue