diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-17 21:11:07 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-17 21:11:07 +0900 |
| commit | 01d3120fd7129f573d88f7aa7c227b3ef93fe368 (patch) | |
| tree | eea4f5ac0f025c7bdbff71d2ee83b4dce99355ef /backend/db | |
| parent | f926ef682de637b717d3b0cc0eaee43c59e83c95 (diff) | |
| parent | b923a9d6534820d33f42bc65c47ae22889bde922 (diff) | |
| download | phperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.tar.gz phperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.tar.zst phperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.zip | |
Merge branch 'feat/icon'
Diffstat (limited to 'backend/db')
| -rw-r--r-- | backend/db/query.sql.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go index 02e660a..35b7edd 100644 --- a/backend/db/query.sql.go +++ b/backend/db/query.sql.go @@ -584,3 +584,19 @@ func (q *Queries) UpdateGameState(ctx context.Context, arg UpdateGameStateParams _, err := q.db.Exec(ctx, updateGameState, arg.GameID, arg.State) return err } + +const updateUserIconPath = `-- name: UpdateUserIconPath :exec +UPDATE users +SET icon_path = $2 +WHERE user_id = $1 +` + +type UpdateUserIconPathParams struct { + UserID int32 + IconPath *string +} + +func (q *Queries) UpdateUserIconPath(ctx context.Context, arg UpdateUserIconPathParams) error { + _, err := q.db.Exec(ctx, updateUserIconPath, arg.UserID, arg.IconPath) + return err +} |
