- Fix redirects to /login for auth required pages
- Add handling for 401/429 + No connection responses in API calls
- Add background workers for Go (clear out password resets)
- Fixed timezone issues
This commit is contained in:
Daniel Mason 2021-04-02 22:24:00 +13:00
parent fd615102a8
commit 9866dea36b
Signed by: idanoo
GPG key ID: 387387CDBC02F132
33 changed files with 795 additions and 248 deletions

View file

@ -12,6 +12,11 @@ import (
"gitlab.com/idanoo/go-scrobble/internal/goscrobble"
)
func init() {
// Set UTC for errything
os.Setenv("TZ", "Etc/UTC")
}
func main() {
fmt.Println("Starting goscrobble")
err := godotenv.Load()
@ -51,8 +56,9 @@ func main() {
goscrobble.InitRedis()
defer goscrobble.CloseRedisConn()
// Clear old reset tokens regularly
// go goscrobble.ClearTokenTimer()
// Start background workers
go goscrobble.StartBackgroundWorkers()
defer goscrobble.EndBackgroundWorkers()
// Boot up API webserver \o/
goscrobble.HandleRequests(port)