aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-21 01:52:27 +0900
committernsfisis <nsfisis@gmail.com>2024-08-21 01:52:27 +0900
commit30e30c1d7db50f8146226c65b4eb8ee0f3d41a34 (patch)
tree62f0600ba5856d9fad8b7e69d74991826c0cc304 /backend/admin/handler.go
parenta7e6e896c512b56f6d8c811ce3fa0353c0d16cca (diff)
downloadiosdc-japan-2024-albatross-30e30c1d7db50f8146226c65b4eb8ee0f3d41a34.tar.gz
iosdc-japan-2024-albatross-30e30c1d7db50f8146226c65b4eb8ee0f3d41a34.tar.zst
iosdc-japan-2024-albatross-30e30c1d7db50f8146226c65b4eb8ee0f3d41a34.zip
feat(backend): add /admin/audio page
Diffstat (limited to 'backend/admin/handler.go')
-rw-r--r--backend/admin/handler.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/backend/admin/handler.go b/backend/admin/handler.go
index 17341d5..a685d16 100644
--- a/backend/admin/handler.go
+++ b/backend/admin/handler.go
@@ -69,6 +69,7 @@ func (h *Handler) RegisterHandlers(g *echo.Group) {
g.GET("/games", h.getGames)
g.GET("/games/:gameID", h.getGameEdit)
g.POST("/games/:gameID", h.postGameEdit)
+ g.GET("/audio", h.getAudioTest)
}
func (h *Handler) getDashboard(c echo.Context) error {
@@ -289,3 +290,24 @@ func (h *Handler) postGameEdit(c echo.Context) error {
return c.Redirect(http.StatusSeeOther, basePath+"/admin/games")
}
+
+func (h *Handler) getAudioTest(c echo.Context) error {
+ return c.Render(http.StatusOK, "audio", echo.Map{
+ "BasePath": basePath,
+ "Title": "Audio Test",
+ "Audio": []echo.Map{
+ {"FileName": "EX_33.wav", "Label": "終了"},
+ {"FileName": "EX_34.wav", "Label": "勝敗1"},
+ {"FileName": "EX_35.wav", "Label": "勝敗2"},
+ {"FileName": "EX_36.wav", "Label": "グッド1"},
+ {"FileName": "EX_37.wav", "Label": "グッド2"},
+ {"FileName": "EX_38.wav", "Label": "グッド3"},
+ {"FileName": "EX_39.wav", "Label": "グッド4"},
+ {"FileName": "EX_40.wav", "Label": "スコア更新1"},
+ {"FileName": "EX_41.wav", "Label": "スコア更新2"},
+ {"FileName": "EX_42.wav", "Label": "スコア更新3"},
+ {"FileName": "EX_43.wav", "Label": "コンパイルエラー1"},
+ {"FileName": "EX_44.wav", "Label": "コンパイルエラー2"},
+ },
+ })
+}