mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-21 18:02:24 +00:00
fix: Add return statement in whoami method if token is unknown
(Fixes #4)
This commit is contained in:
parent
d96df1b1e5
commit
ef06534124
@ -168,6 +168,7 @@ func WhoAmIHandler(w http.ResponseWriter, r *http.Request) {
|
||||
user := currServer.Backend.GetUserByToken(token)
|
||||
if user == nil {
|
||||
errorResponse(w, models.M_UNKNOWN_TOKEN, http.StatusForbidden, "")
|
||||
return
|
||||
}
|
||||
|
||||
response := whoami.Response{UserID: user.ID()}
|
||||
|
Loading…
Reference in New Issue
Block a user