From 95dd5f0c346d10c9a9497daf88cd199ce71c8122 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 17 Aug 2024 19:35:56 +0900 Subject: feat(backend): fetch user icon from fortee --- backend/db/query.sql.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'backend/db/query.sql.go') 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 +} -- cgit v1.2.3-70-g09d2