diff --git a/components/turntimer.html b/components/turntimer.html
index 791571d..1a05033 100644
--- a/components/turntimer.html
+++ b/components/turntimer.html
@@ -1,5 +1,5 @@
{{define "turntimer"}}
- Timer: {{.Settings.TurnSecondsLeft}}
+ Timer: no time to lose
{{end}}
diff --git a/handlers/auth.go b/handlers/auth.go
index f622771..e683aaa 100644
--- a/handlers/auth.go
+++ b/handlers/auth.go
@@ -109,7 +109,7 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
fi.Room = room
fi.List = nil
fi.State.RoomID = &room.ID
- if err := repo.PlayerSetRoomID(r.Context(), fi.State.Username, room.ID); err != nil {
+ if err := repo.PlayerSetRoomID(r.Context(), room.ID, fi.State.Username); err != nil {
abortWithError(w, err.Error())
return
}
diff --git a/migrations/001_initial_schema.up.sql b/migrations/001_initial_schema.up.sql
index 18b6d77..fc9a960 100644
--- a/migrations/001_initial_schema.up.sql
+++ b/migrations/001_initial_schema.up.sql
@@ -65,7 +65,6 @@ CREATE TABLE settings (
language TEXT NOT NULL DEFAULT 'en',
room_pass TEXT NOT NULL DEFAULT '',
turn_time INTEGER NOT NULL DEFAULT 60, -- seconds
- turn_seconds_left INTEGER NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (room_id) REFERENCES rooms(id) ON DELETE CASCADE
);
diff --git a/repos/players.go b/repos/players.go
index 7c4ee49..13378b7 100644
--- a/repos/players.go
+++ b/repos/players.go
@@ -50,7 +50,7 @@ func (p *RepoProvider) PlayerAdd(ctx context.Context, player *models.Player) err
func (p *RepoProvider) PlayerUpdate(ctx context.Context, player *models.Player) error {
db := getDB(ctx, p.DB)
- _, err := db.ExecContext(ctx, "UPDATE players SET team = ?, role = ? WHERE username = ?",
+ _, err := db.ExecContext(ctx, "UPDATE players SET team = ?, role = ? WHERE username = ?;",
player.Team, player.Role, player.Username)
return err
}
diff --git a/repos/rooms.go b/repos/rooms.go
index ea56a78..838da24 100644
--- a/repos/rooms.go
+++ b/repos/rooms.go
@@ -63,7 +63,7 @@ func (p *RepoProvider) RoomUpdate(ctx context.Context, r *models.Room) error {
if err != nil {
return err
}
- _, err = db.ExecContext(ctx, `UPDATE settings SET language = ?, room_pass = ?, turn_time = ?, WHERE room_id = ?`, r.Settings.Language, r.Settings.RoomPass, r.Settings.RoundTime, r.ID)
+ _, err = db.ExecContext(ctx, `UPDATE settings SET language = ?, room_pass = ?, turn_time = ? WHERE room_id = ?`, r.Settings.Language, r.Settings.RoomPass, r.Settings.RoundTime, r.ID)
return err
}