This commit is contained in:
@ -200,10 +200,14 @@ func (db *dbLayer) increasePlayerOnlineDuration(ctx context.Context, playerID st
|
||||
return db.execInTransaction(ctx, "UPDATE players SET online_duration = online_duration + $2 WHERE id = $1", playerID, onlineDurationSecond)
|
||||
}
|
||||
|
||||
func (db *dbLayer) updatePlayerLastOnline(ctx context.Context, playerID string, lastOnline time.Time) error {
|
||||
func (db *dbLayer) updatePlayerLastLogin(ctx context.Context, playerID string, lastOnline time.Time) error {
|
||||
return db.execInTransaction(ctx, "UPDATE players SET last_login = $2 WHERE id = $1", playerID, lastOnline.Format(time.RFC3339))
|
||||
}
|
||||
|
||||
func (db *dbLayer) updatePlayerLastLogout(ctx context.Context, playerID string, lastOnline time.Time) error {
|
||||
return db.execInTransaction(ctx, "UPDATE players SET last_logout = $2 WHERE id = $1", playerID, lastOnline.Format(time.RFC3339))
|
||||
}
|
||||
|
||||
func (db *dbLayer) increasePlayerDeath(ctx context.Context, playerID string, deaths int) error {
|
||||
return db.execInTransaction(ctx, "UPDATE players SET deaths = deaths + $2 WHERE id = $1", playerID, deaths)
|
||||
}
|
||||
|
Reference in New Issue
Block a user