mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-05 02:01: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)
|
||||
if token == "" {
|
||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||
return
|
||||
}
|
||||
|
||||
user := currServer.Backend.GetUserByToken(token)
|
||||
@ -217,6 +218,7 @@ func PasswordHandler(w http.ResponseWriter, r *http.Request) {
|
||||
token := getTokenFromResponse(r)
|
||||
if token == "" {
|
||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||
return
|
||||
}
|
||||
|
||||
user := currServer.Backend.GetUserByToken(token)
|
||||
@ -244,7 +246,6 @@ func SyncHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
request.Timeout = timeout
|
||||
//log.Printf("%+v", request)
|
||||
|
||||
token := getTokenFromResponse(r)
|
||||
if token == "" {
|
||||
@ -270,6 +271,7 @@ func CapabilitiesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
token := getTokenFromResponse(r)
|
||||
if token == "" {
|
||||
errorResponse(w, models.M_FORBIDDEN, http.StatusForbidden, "")
|
||||
return
|
||||
}
|
||||
|
||||
user := currServer.Backend.GetUserByToken(token)
|
||||
|
Loading…
Reference in New Issue
Block a user