db: migrate invites, user expiry

some fixes to stuff in there too, probably
This commit is contained in:
Harvey Tindall
2023-06-24 19:13:05 +01:00
parent a470d77938
commit 63948a6de0
9 changed files with 168 additions and 204 deletions
+2 -3
View File
@@ -38,8 +38,8 @@ func (app *appContext) MyDetails(gc *gin.Context) {
}
resp.Disabled = user.Policy.IsDisabled
if exp, ok := app.storage.users[user.ID]; ok {
resp.Expiry = exp.Unix()
if exp, ok := app.storage.GetUserExpiryKey(user.ID); ok {
resp.Expiry = exp.Expiry.Unix()
}
app.storage.loadEmails()
@@ -199,7 +199,6 @@ func (app *appContext) confirmMyAction(gc *gin.Context, key string) {
}
}
app.storage.storeEmails()
app.info.Println("Email list modified")
gc.Redirect(http.StatusSeeOther, "/my/account")
return