move common static files, 503 on unavailable services
This commit is contained in:
parent
7b92f97b24
commit
b2485eda79
47 changed files with 36 additions and 9 deletions
|
|
@ -412,6 +412,7 @@ type (
|
|||
// Unfortunately, this function is very unreliable for pulling chronological
|
||||
// subscription records. Twitch API does not currently provide a mechanism for
|
||||
// fetching the latest subscriber; this will need to be tracked manually.
|
||||
/*
|
||||
func (srv *Service) getSubscribers(
|
||||
ctx context.Context,
|
||||
broadcasterID string,
|
||||
|
|
@ -442,3 +443,4 @@ func (srv *Service) getSubscribers(
|
|||
|
||||
return resData, nil
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Twitch Labels</title>
|
||||
<link rel="stylesheet" href="/music/public/fonts/inter/inter.css">
|
||||
<link rel="stylesheet" href="/public/fonts/inter/inter.css">
|
||||
<link rel="stylesheet" href="/twitch/public/labels.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ func New(ctx context.Context, opts ServiceOptions) (*Service, error) {
|
|||
|
||||
func (srv *Service) BindRoutes(group *gin.RouterGroup) {
|
||||
group.GET("/public/*path", func(ctx *gin.Context) {
|
||||
path := strings.TrimPrefix(ctx.Request.URL.Path, "/twitch/")
|
||||
http.ServeFileFS(ctx.Writer, ctx.Request, publicFS, path)
|
||||
filepath := strings.TrimPrefix(ctx.Request.URL.Path, "/twitch/")
|
||||
http.ServeFileFS(ctx.Writer, ctx.Request, publicFS, filepath)
|
||||
})
|
||||
|
||||
group.GET("/login", func(ctx *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue