api: update commenter information on new login
This commit is contained in:
@@ -109,7 +109,6 @@ func githubCallbackHandler(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, "github", "")
|
||||
if err != nil {
|
||||
@@ -117,6 +116,11 @@ func githubCallbackHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err = commenterUpdate(c.CommenterHex, email, name, link, photo, "github"); 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