Added NickToUser
This commit is contained in:
16
main.go
16
main.go
@ -1,8 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/pages/airing"
|
||||
@ -57,20 +55,16 @@ func main() {
|
||||
return ctx.JSON(app.Config.Manifest)
|
||||
})
|
||||
|
||||
// Scripts
|
||||
app.Get("/scripts.js", func(ctx *aero.Context) string {
|
||||
return ctx.File("temp/scripts.js")
|
||||
})
|
||||
|
||||
// For benchmarks
|
||||
app.Get("/hello", func(ctx *aero.Context) string {
|
||||
return ctx.Text("Hello World")
|
||||
})
|
||||
|
||||
// Scripts
|
||||
scripts, _ := ioutil.ReadFile("temp/scripts.js")
|
||||
js := string(scripts)
|
||||
|
||||
app.Get("/scripts.js", func(ctx *aero.Context) string {
|
||||
ctx.SetHeader("Content-Type", "application/javascript")
|
||||
return js
|
||||
})
|
||||
|
||||
// Let's go
|
||||
app.Run()
|
||||
}
|
||||
|
Reference in New Issue
Block a user