api: update commenter information on new login
This commit is contained in:
@@ -76,7 +76,6 @@ func gitlabCallbackHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var commenterHex string
|
||||
|
||||
// TODO: in case of returning users, update the information we have on record?
|
||||
if err == errorNoSuchCommenter {
|
||||
commenterHex, err = commenterNew(email, name, link, photo, "gitlab", "")
|
||||
if err != nil {
|
||||
@@ -84,6 +83,11 @@ func gitlabCallbackHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err = commenterUpdate(c.CommenterHex, email, name, link, photo, "gitlab"); err != nil {
|
||||
logger.Warningf("cannot update commenter: %s", err)
|
||||
// not a serious enough to exit with an error
|
||||
}
|
||||
|
||||
commenterHex = c.CommenterHex
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user