aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/query.sql
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-12 03:10:46 +0900
committernsfisis <nsfisis@gmail.com>2025-03-12 03:10:46 +0900
commit27168df997c298e871d34e58fdc726bf2e8a4954 (patch)
tree3bbd0db1eef071a9bd04d2d39cc92a01e5f1bc9d /backend/query.sql
parent4848d10be595cbc257b1d43be1c924fdcf81284e (diff)
downloadiosdc-japan-2025-albatross-27168df997c298e871d34e58fdc726bf2e8a4954.tar.gz
iosdc-japan-2025-albatross-27168df997c298e871d34e58fdc726bf2e8a4954.tar.zst
iosdc-japan-2025-albatross-27168df997c298e871d34e58fdc726bf2e8a4954.zip
feat(backend): implement user edit page
Diffstat (limited to 'backend/query.sql')
-rw-r--r--backend/query.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/query.sql b/backend/query.sql
index dbf050b..e81a11b 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -28,6 +28,15 @@ JOIN user_auths ON users.user_id = user_auths.user_id
WHERE users.username = $1
LIMIT 1;
+-- name: UpdateUser :exec
+UPDATE users
+SET
+ display_name = $2,
+ icon_path = $3,
+ is_admin = $4,
+ label = $5
+WHERE user_id = $1;
+
-- name: CreateUserAuth :exec
INSERT INTO user_auths (user_id, auth_type)
VALUES ($1, $2);