commenter_login.go: include commenter struct in response
This commit is contained in:
parent
caca7b8c41
commit
0acdd67e39
@ -67,5 +67,12 @@ func commenterLoginHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
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})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user