Simplified file upload
This commit is contained in:
parent
5594b20e8d
commit
9cdd254eda
12
main.go
12
main.go
@ -47,14 +47,14 @@ func main() {
|
|||||||
app.Ajax("/airing", airing.Get)
|
app.Ajax("/airing", airing.Get)
|
||||||
app.Ajax("/users", users.Get)
|
app.Ajax("/users", users.Get)
|
||||||
|
|
||||||
app.Get("/manifest.json", func(ctx *aero.Context) string {
|
// Favicon
|
||||||
return ctx.JSON(app.Config.Manifest)
|
app.Get("/favicon.ico", func(ctx *aero.Context) string {
|
||||||
|
return ctx.File("images/icons/favicon.ico")
|
||||||
})
|
})
|
||||||
|
|
||||||
app.Get("/favicon.ico", func(ctx *aero.Context) string {
|
// Web manifest
|
||||||
ctx.SetHeader("Content-Type", "image/x-icon")
|
app.Get("/manifest.json", func(ctx *aero.Context) string {
|
||||||
data, _ := ioutil.ReadFile("images/icons/favicon.ico")
|
return ctx.JSON(app.Config.Manifest)
|
||||||
return string(data)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// For benchmarks
|
// For benchmarks
|
||||||
|
Loading…
Reference in New Issue
Block a user