dataprovider: add timestamp fields for users and admins

This commit is contained in:
Nicola Murino
2021-08-19 15:51:43 +02:00
parent b99d4ce82e
commit be3857d572
52 changed files with 725 additions and 76 deletions

View File

@@ -341,7 +341,7 @@ func authenticateAdminWithAPIKey(username, keyID string, tokenAuth *jwtauth.JWTA
return err
}
r.Header.Set("Authorization", fmt.Sprintf("Bearer %v", resp["access_token"]))
dataprovider.UpdateAdminLastLogin(&admin)
return nil
}
@@ -397,7 +397,7 @@ func authenticateUserWithAPIKey(username, keyID string, tokenAuth *jwtauth.JWTAu
return err
}
r.Header.Set("Authorization", fmt.Sprintf("Bearer %v", resp["access_token"]))
dataprovider.UpdateLastLogin(&user) //nolint:errcheck
dataprovider.UpdateLastLogin(&user)
updateLoginMetrics(&user, ipAddr, nil)
return nil