feat: room photo gallery, featured photo, and comments moderation
This commit is contained in:
@@ -71,3 +71,8 @@ export async function requireAuth() {
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
export async function canComment(userId: number) {
|
||||
const { rows } = await db.query('SELECT comments_disabled FROM users WHERE id = $1', [userId]);
|
||||
return rows.length === 0 || !rows[0].comments_disabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user