Files
honoka-chan/internal/handler/live/gameover.go
T
YumeMichi 0aacf8a4e9 Improve live and random live handling
- Add random live handlers, schemas and persistence for lot/play/continue/gameover/reward flow
- Update live status and schedule generation, including special rotation handling and CN timezone alignment
- Add config support for unlocking all daily special rotation songs and document the option
- Refresh live play, reward, precise score and session logic plus bundled main.db updates

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 20:59:45 +08:00

35 lines
652 B
Go

package live
import (
"honoka-chan/internal/middleware"
"honoka-chan/internal/router"
liveschema "honoka-chan/internal/schema/live"
"honoka-chan/internal/session"
"github.com/gin-gonic/gin"
)
func gameOver(ctx *gin.Context) {
ss := session.Get(ctx)
defer func() {
if ss.UserEng != nil {
ss.ClearLiveInProgress()
}
ss.Finalize()
}()
ss.Respond(BuildGameOverResp())
}
func BuildGameOverResp() liveschema.GameOverResp {
return liveschema.GameOverResp{
ResponseData: []any{},
ReleaseInfo: []any{},
StatusCode: 200,
}
}
func init() {
router.AddHandler("main.php", "POST", "/live/gameover", middleware.Common, gameOver)
}