Skip to content

Commit e1f75ac

Browse files
author
qiwen.luo
committed
fix: some router
1 parent ce76eff commit e1f75ac

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ADD ./go.mod ./go.sum /build/
1717
RUN go mod download
1818

1919
COPY . .
20-
COPY --from=builder-frontend /build/dist ./dist
20+
COPY --from=builder-frontend /build/dist/* ./public/
2121

2222
RUN go build -trimpath -ldflags "-s -w" -o /build/bin/rm-schedule
2323

internal/router/router.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import (
88
)
99

1010
// Router defines the router for this service
11-
func Router(r *iris.Application, frontend *embed.FS) {
11+
func Router(r *iris.Application, frontend embed.FS) {
1212
api := r.Party("/api")
1313
api.Get("/schedule", handler.ScheduleHandler)
1414
api.Get("/group_rank_info", handler.GroupRankInfoHandler)
1515
api.Get("/static/*path", handler.RMStaticHandler)
1616
api.Get("/mp/match", handler.MpMatchHandler)
1717
api.Get("/rank", handler.RankListHandler)
1818

19-
r.HandleDir("/", *frontend, iris.DirOptions{
19+
r.HandleDir("/", frontend, iris.DirOptions{
2020
IndexName: "index.html",
21-
ShowList: true,
21+
ShowList: false,
2222
Compress: true,
2323
})
2424

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func main() {
1717
defer cron.Stop()
1818

1919
r := iris.Default()
20-
router.Router(r, &frontend)
20+
router.Router(r, frontend)
2121

2222
if err := r.Listen(":8080"); err != nil {
2323
panic(err)

0 commit comments

Comments
 (0)