Refactor to use aerogo/database

This commit is contained in:
2017-10-27 09:11:56 +02:00
parent c0d7b0d2df
commit b07a98ed32
18 changed files with 52 additions and 164 deletions
auth
main.go
pages
database
editor
explore
forum
listimport
listimportanilist
listimportkitsu
listimportmyanimelist
paypal
shop
statistics
threads
users
patches/export-aero-db

@ -2,7 +2,6 @@ package main
import (
"github.com/aerogo/aero"
"github.com/aerogo/session-store-aerospike"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/auth"
"github.com/animenotifier/notify.moe/components/css"
@ -69,7 +68,10 @@ func configure(app *aero.Application) *aero.Application {
// Sessions
app.Sessions.Duration = 3600 * 24 * 30 * 6
app.Sessions.Store = aerospikestore.New(arn.DB, "Session", app.Sessions.Duration)
// TODO: ...
println("Using memory session store")
// app.Sessions.Store = aerospikestore.New(arn.DB, "Session", app.Sessions.Duration)
// Layout
app.Layout = layout.Render
@ -210,8 +212,6 @@ func configure(app *aero.Application) *aero.Application {
// Domain
if arn.IsDevelopment() {
app.Config.Domain = "beta.notify.moe"
} else {
arn.DB.SetScanPriority("high")
}
// Authentication