Skip to content

Commit 076d1b8

Browse files
committed
add TODO
1 parent 2655a80 commit 076d1b8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ async function init() {
5656
app.secretValue =
5757
(await getSecretValue(genericConfig.ConfigSecretName)) || {};
5858
}
59-
// if (!app.sequelizeInstance) {
60-
// app.sequelizeInstance = await getSequelizeInstance(app);
61-
// }
59+
if (!app.sequelizeInstance) {
60+
app.sequelizeInstance = await getSequelizeInstance(app);
61+
}
6262
req.startTime = now();
6363
req.log.info({ url: req.raw.url }, "received request");
6464
});

src/routes/linkry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ const linkryRoutes: FastifyPluginAsync = async (fastify, _options) => {
264264
throw new UnauthorizedError({ message: "Could not get user roles." });
265265
}
266266
try {
267+
// TODO: optimize this to use a proper query in sequelize
267268
const isAdmin = request.userRoles.has(AppRoles.LINKS_ADMIN);
268269
let filteredLinks = await ShortLinkModel.findAll();
269270
if (!isAdmin) {

0 commit comments

Comments
 (0)