mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-09 20:21:03 +00:00
Add forgotten returns in case of error
This commit is contained in:
parent
e8165db50f
commit
b87c860d7d
@ -189,6 +189,7 @@ func JoinedRoomsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
token := getTokenFromResponse(r)
|
token := getTokenFromResponse(r)
|
||||||
if token == "" {
|
if token == "" {
|
||||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
user := currServer.Backend.GetUserByToken(token)
|
user := currServer.Backend.GetUserByToken(token)
|
||||||
@ -217,6 +218,7 @@ func PasswordHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
token := getTokenFromResponse(r)
|
token := getTokenFromResponse(r)
|
||||||
if token == "" {
|
if token == "" {
|
||||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
user := currServer.Backend.GetUserByToken(token)
|
user := currServer.Backend.GetUserByToken(token)
|
||||||
@ -244,7 +246,6 @@ func SyncHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
request.Timeout = timeout
|
request.Timeout = timeout
|
||||||
//log.Printf("%+v", request)
|
|
||||||
|
|
||||||
token := getTokenFromResponse(r)
|
token := getTokenFromResponse(r)
|
||||||
if token == "" {
|
if token == "" {
|
||||||
@ -270,6 +271,7 @@ func CapabilitiesHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
token := getTokenFromResponse(r)
|
token := getTokenFromResponse(r)
|
||||||
if token == "" {
|
if token == "" {
|
||||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
user := currServer.Backend.GetUserByToken(token)
|
user := currServer.Backend.GetUserByToken(token)
|
||||||
|
Loading…
Reference in New Issue
Block a user