mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 15:29:02 +00:00
Some error handling work
This commit is contained in:
@@ -156,6 +156,9 @@ func getSessionCtx(username string, password string, admin bool) *http.Client {
|
||||
|
||||
if admin {
|
||||
manager, _ := testApi.Database.ValidateCredentials([]byte(username), []byte(password))
|
||||
if manager == nil {
|
||||
return nil
|
||||
}
|
||||
manager.WebsiteAdmin = true
|
||||
testApi.Database.UpdateManager(manager)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user