aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/db/query.sql.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-05 02:33:54 +0900
committernsfisis <nsfisis@gmail.com>2024-08-05 03:02:18 +0900
commit968b835d0e6fe960c3d7ab915ef6d9cecec4ab7f (patch)
treeee5c3cd7e3817866439f71eccb085e8394a0a1a5 /backend/db/query.sql.go
parent5988360d8cf0fc0028c6db1c82afc1e313ba0513 (diff)
downloadphperkaigi-2025-albatross-968b835d0e6fe960c3d7ab915ef6d9cecec4ab7f.tar.gz
phperkaigi-2025-albatross-968b835d0e6fe960c3d7ab915ef6d9cecec4ab7f.tar.zst
phperkaigi-2025-albatross-968b835d0e6fe960c3d7ab915ef6d9cecec4ab7f.zip
feat(backend): allow to edit `game_type` in admin page
Diffstat (limited to 'backend/db/query.sql.go')
-rw-r--r--backend/db/query.sql.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go
index 464d7f8..c574ca8 100644
--- a/backend/db/query.sql.go
+++ b/backend/db/query.sql.go
@@ -251,16 +251,18 @@ func (q *Queries) ListUsers(ctx context.Context) ([]User, error) {
const updateGame = `-- name: UpdateGame :exec
UPDATE games
SET
- state = $2,
- display_name = $3,
- duration_seconds = $4,
- started_at = $5,
- problem_id = $6
+ game_type = $2,
+ state = $3,
+ display_name = $4,
+ duration_seconds = $5,
+ started_at = $6,
+ problem_id = $7
WHERE game_id = $1
`
type UpdateGameParams struct {
GameID int32
+ GameType string
State string
DisplayName string
DurationSeconds int32
@@ -271,6 +273,7 @@ type UpdateGameParams struct {
func (q *Queries) UpdateGame(ctx context.Context, arg UpdateGameParams) error {
_, err := q.db.Exec(ctx, updateGame,
arg.GameID,
+ arg.GameType,
arg.State,
arg.DisplayName,
arg.DurationSeconds,