Archived
Template
1
0

Various fixes (#5)

* Fixes #1

* Fixes #2

* Fixes #3

* Fixes #4
This commit is contained in:
Markus Tenghamn
2021-12-13 20:33:50 +01:00
committed by GitHub
parent c2493c238f
commit b5ba3d0387
234 changed files with 872 additions and 58627 deletions

View File

@ -18,7 +18,7 @@ func Session(db *gorm.DB) gin.HandlerFunc {
Identifier: sessionIdentifier,
}
res := db.Where(&ses).First(&ses)
if res.Error == nil {
if res.Error == nil && !ses.HasExpired() {
c.Set(UserIDKey, ses.UserID)
} else {
log.Println(res.Error)