Sessions are almost in use now
This commit is contained in:
parent
1db5d85a8a
commit
360c991884
22
main.go
22
main.go
@ -5,6 +5,7 @@ import (
|
||||
"runtime"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/jobs"
|
||||
"github.com/animenotifier/notify.moe/pages/airing"
|
||||
@ -24,13 +25,22 @@ var app = aero.New()
|
||||
|
||||
func main() {
|
||||
app.SetStyle(components.BundledCSS)
|
||||
app.Config.GZipCache = false
|
||||
|
||||
// user, _ := arn.GetUserByNick("Akyoto")
|
||||
// user.CoverImage.URL = "https://www.pixelstalk.net/wp-content/uploads/2016/10/Hanyijie-sky-scenery-ship-anime-art-1920x1080.jpg"
|
||||
// user.CoverImage.Position.X = "50%"
|
||||
// user.CoverImage.Position.Y = "0%"
|
||||
// user.Save()
|
||||
// app.Sessions = sessions.New(sessions.Config{
|
||||
// Cookie: "sid",
|
||||
// Expires: time.Duration(30) * time.Second,
|
||||
// GcDuration: time.Duration(30) * time.Second,
|
||||
// DecodeCookie: false,
|
||||
// DisableSubdomainPersistence: false,
|
||||
// })
|
||||
|
||||
app.Sessions.Store = aero.NewMemoryStore()
|
||||
|
||||
user, _ := arn.GetUserByNick("Akyoto")
|
||||
user.CoverImage.URL = "https://www.pixelstalk.net/wp-content/uploads/2016/10/Hanyijie-sky-scenery-ship-anime-art-1920x1080.jpg"
|
||||
user.CoverImage.Position.X = "50%"
|
||||
user.CoverImage.Position.Y = "0%"
|
||||
user.Save()
|
||||
|
||||
// Background jobs
|
||||
go jobs.AiringAnime()
|
||||
|
@ -1,3 +1,3 @@
|
||||
component Airing(animeList []*arn.Anime)
|
||||
h2 Airing
|
||||
h2(title=toString(len(animeList)) + " anime") Airing
|
||||
AnimeGrid(animeList)
|
@ -1,3 +1,3 @@
|
||||
component Genre(genre *arn.Genre)
|
||||
h2= arn.Capitalize(genre.ID)
|
||||
h2(title=toString(len(genre.AnimeList)) + " anime")= arn.Capitalize(genre.ID)
|
||||
AnimeGrid(genre.AnimeList)
|
Loading…
Reference in New Issue
Block a user