Use background context, don't fall through

This commit is contained in:
Neil Alexander 2022-08-25 14:38:19 +01:00
parent 1622df2499
commit ef0dcf6bee
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package routing
import (
"context"
"encoding/json"
"net/http"
@ -104,7 +105,7 @@ func AdminPurgeRoom(req *http.Request, cfg *config.ClientAPI, device *userapi.De
}
res := &roomserverAPI.PerformAdminPurgeRoomResponse{}
if err := rsAPI.PerformAdminPurgeRoom(
req.Context(),
context.Background(),
&roomserverAPI.PerformAdminPurgeRoomRequest{
RoomID: roomID,
},

View file

@ -253,6 +253,7 @@ func (r *Admin) PerformAdminPurgeRoom(
Code: api.PerformErrorBadRequest,
Msg: err.Error(),
}
return nil
} else {
logrus.WithField("room_id", req.RoomID).Warn("Room purged from roomserver")
}