mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-10 05:39:38 +05:00
cache /_/info marshaled data; restructure dockerfile
This commit is contained in:
24
main.go
24
main.go
@@ -340,16 +340,22 @@ func main() {
|
||||
DefaultPreferences cfg.Preferences
|
||||
}
|
||||
|
||||
inf, err := json.Marshal(info{
|
||||
Commit: cfg.Commit,
|
||||
Repo: cfg.Repo,
|
||||
ProxyImages: cfg.ProxyImages,
|
||||
ProxyStreams: cfg.ProxyStreams,
|
||||
Restream: cfg.Restream,
|
||||
GetWebProfiles: cfg.GetWebProfiles,
|
||||
DefaultPreferences: cfg.DefaultPreferences,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalln("failed to marshal info: ", err)
|
||||
}
|
||||
|
||||
app.Get("/_/info", func(c *fiber.Ctx) error {
|
||||
return c.JSON(info{
|
||||
Commit: cfg.Commit,
|
||||
Repo: cfg.Repo,
|
||||
ProxyImages: cfg.ProxyImages,
|
||||
ProxyStreams: cfg.ProxyStreams,
|
||||
Restream: cfg.Restream,
|
||||
GetWebProfiles: cfg.GetWebProfiles,
|
||||
DefaultPreferences: cfg.DefaultPreferences,
|
||||
})
|
||||
c.Set("Content-Type", "application/json")
|
||||
return c.Send(inf)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user