Skip to content

Commit

Permalink
Merge pull request #191 from aaguiarz/fix/use-correct-resource-ids
Browse files Browse the repository at this point in the history
Use proper ID for todo Item in can_update_todo and can_delete_todo
  • Loading branch information
ogazitt authored Jan 7, 2025
2 parents 096b5a9 + 29cc019 commit 91d8e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interop/authzen-todo-backend/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const resourceMapper = async (
const todo = await store.get(req.params.id);
return {
type: "todo",
id: todo.OwnerID,
id: todo.ID,
ownerID: specVersion === "1.0-preview" ? todo.OwnerID : undefined,
properties:
specVersion !== "1.0-preview" ? { ownerID: todo.OwnerID } : undefined,
Expand All @@ -63,7 +63,7 @@ const resourceMapper = async (
const todoToDelete = await store.get(req.params.id);
return {
type: "todo",
id: todoToDelete.OwnerID,
id: todo.ID,
ownerID:
specVersion === "1.0-preview" ? todoToDelete.OwnerID : undefined,
properties:
Expand Down

0 comments on commit 91d8e63

Please sign in to comment.