DeleteSession deletes the session that match the given info
(sessionKey string)
| 57 | |
| 58 | // DeleteSession deletes the session that match the given info |
| 59 | func (a *App) DeleteSession(sessionKey string) error { |
| 60 | if err := a.DB.Where("key = ?", sessionKey).Delete(&database.Session{}).Error; err != nil { |
| 61 | return errors.Wrap(err, "deleting the session") |
| 62 | } |
| 63 | |
| 64 | return nil |
| 65 | } |