From 27168df997c298e871d34e58fdc726bf2e8a4954 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Wed, 12 Mar 2025 03:10:46 +0900
Subject: feat(backend): implement user edit page

---
 backend/query.sql | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'backend/query.sql')

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);
-- 
cgit v1.3.1

