From ead3b0af9d2701b2901d47f1ea17917a2a1ce003 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Fri, 1 Apr 2022 16:51:07 -0700 Subject: [PATCH] server: fix accessing password protected posts --- server/src/database.ts | 2 +- server/src/routes/posts.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/database.ts b/server/src/database.ts index deae23a2..e9f2b69f 100644 --- a/server/src/database.ts +++ b/server/src/database.ts @@ -32,7 +32,7 @@ export type Migration = typeof umzug._types.migration // If you're in a development environment, you can manually migrate with `yarn migrate:{up,down}` in the `server` folder if (config.is_production) { - ;(async () => { + ; (async () => { // Checks migrations and run them if they are not already applied. To keep // track of the executed migrations, a table (and sequelize model) called SequelizeMeta // will be automatically created (if it doesn't exist already) and parsed. diff --git a/server/src/routes/posts.ts b/server/src/routes/posts.ts index a4959aa4..25d0d0dc 100644 --- a/server/src/routes/posts.ts +++ b/server/src/routes/posts.ts @@ -246,7 +246,8 @@ posts.get( "createdAt", "updatedAt", "deletedAt", - "expiresAt" + "expiresAt", + "password" ] })