feat(user notifications): added the ability for users to sub to notifications and add multi email
This commit is contained in:
@@ -21,12 +21,16 @@ r.get("/", async (req, res: Response) => {
|
||||
},
|
||||
});
|
||||
|
||||
if (userId !== "") {
|
||||
hasPermissions.success = false;
|
||||
}
|
||||
|
||||
const { data, error } = await tryCatch(
|
||||
db
|
||||
.select()
|
||||
.from(notificationSub)
|
||||
.where(
|
||||
userId || !hasPermissions.success
|
||||
!hasPermissions.success
|
||||
? eq(notificationSub.userId, `${req?.user?.id ?? ""}`)
|
||||
: undefined,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user