1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Read the persisted summary interval from a cookie

This cookie will be read only if the `interval` or `from` query params
are not set. If the cookie is also unset, it will still default to
the "today" interval.

TODO: The cookie still needs to be set on the client
with a `Set-Cookie` response header.
This commit is contained in:
Daste
2022-11-05 19:30:40 +01:00
parent ba81c07345
commit e89ce076fd
2 changed files with 11 additions and 4 deletions

View File

@ -12,9 +12,10 @@ import (
)
const (
UserKey = "user"
ImprintKey = "imprint"
AuthCookieKey = "wakapi_auth"
UserKey = "user"
ImprintKey = "imprint"
AuthCookieKey = "wakapi_auth"
PersistentIntervalKey = "wakapi_summary_interval"
)
type MigrationFunc func(db *gorm.DB) error