diff --git a/api/commenter_login.go b/api/commenter_login.go index c127eec..6b04905 100644 --- a/api/commenter_login.go +++ b/api/commenter_login.go @@ -67,5 +67,12 @@ func commenterLoginHandler(w http.ResponseWriter, r *http.Request) { return } - bodyMarshal(w, response{"success": true, "commenterToken": commenterToken}) + // TODO: modify commenterLogin to directly return c? + c, err := commenterGetByCommenterToken(commenterToken) + if err != nil { + bodyMarshal(w, response{"success": false, "message": err.Error()}) + return + } + + bodyMarshal(w, response{"success": true, "commenterToken": commenterToken, "commenter": c}) }