Skip to content

Commit 425db2b

Browse files
committed
fix: Add missing curly braces for conditional check in PostService
1 parent 2079394 commit 425db2b

File tree

1 file changed

+2
-1
lines changed
  • apps/server/src/services/PostService

1 file changed

+2
-1
lines changed

apps/server/src/services/PostService/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,9 @@ export class PostService implements Service {
525525
if (temp_only) {
526526
if (!username) throw new BadRequestError('username is missing')
527527
if (!user) throw new NotFoundError('Invalid username')
528-
if (user.id !== signedUserId)
528+
if (user.id !== signedUserId) {
529529
throw new UnauthorizedError('You have no permission to load temp posts')
530+
}
530531

531532
Object.assign(whereQuery, { is_temp: true })
532533
} else {

0 commit comments

Comments
 (0)