Skip to content

Commit

Permalink
* added userInTeam and authRequired polisy
Browse files Browse the repository at this point in the history
* changed logical mistake in comment
  • Loading branch information
e11sy committed Oct 22, 2023
1 parent da7094b commit 825cee2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/presentation/http/router/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ const NoteRouter: FastifyPluginCallback<NoteRouterOptions> = (fastify, opts, don
},
},
},
config: {
policy: [
'authRequired',
'userInTeam',
],
},
preHandler: [
noteResolver,
],
Expand Down
2 changes: 1 addition & 1 deletion src/repository/storage/postgres/orm/sequelize/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class NoteSequelizeStorage {
});

/**
* If note not found, return null
* If note not found return false
*/
return affectedRows > 0;
}
Expand Down

0 comments on commit 825cee2

Please sign in to comment.