mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
feat: impl traits to add, get and mark read notifications for sqlx
postgres
This commit is contained in:
14
db/db-sqlx-postgres/src/mark_notification_read.sql
Normal file
14
db/db-sqlx-postgres/src/mark_notification_read.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- mark a notification as read
|
||||
UPDATE mcaptcha_notifications
|
||||
SET read = TRUE
|
||||
WHERE
|
||||
mcaptcha_notifications.id = $1
|
||||
AND
|
||||
mcaptcha_notifications.rx = (
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
mcaptcha_users
|
||||
WHERE
|
||||
name = $2
|
||||
);
|
||||
Reference in New Issue
Block a user