Skip to content

Commit

Permalink
add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Nov 12, 2024
1 parent 2655a80 commit 076d1b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ async function init() {
app.secretValue =
(await getSecretValue(genericConfig.ConfigSecretName)) || {};
}
// if (!app.sequelizeInstance) {
// app.sequelizeInstance = await getSequelizeInstance(app);
// }
if (!app.sequelizeInstance) {
app.sequelizeInstance = await getSequelizeInstance(app);
}
req.startTime = now();
req.log.info({ url: req.raw.url }, "received request");
});
Expand Down
1 change: 1 addition & 0 deletions src/routes/linkry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ const linkryRoutes: FastifyPluginAsync = async (fastify, _options) => {
throw new UnauthorizedError({ message: "Could not get user roles." });
}
try {
// TODO: optimize this to use a proper query in sequelize
const isAdmin = request.userRoles.has(AppRoles.LINKS_ADMIN);
let filteredLinks = await ShortLinkModel.findAll();
if (!isAdmin) {
Expand Down

0 comments on commit 076d1b8

Please sign in to comment.