fix: make previous MR compile

This commit is contained in:
Timo Kösters 2022-10-15 14:07:27 +02:00
parent 13052388a7
commit 2231a69b4c
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4

View file

@ -85,7 +85,7 @@ pub async fn set_room_visibility_route(
) -> Result<set_room_visibility::v3::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
if !db.rooms.exists(&body.room_id)? {
if !services().rooms.metadata.exists(&body.room_id)? {
// Return 404 if the room doesn't exist
return Err(Error::BadRequest(
ErrorKind::NotFound,
@ -117,7 +117,7 @@ pub async fn get_room_visibility_route(
body: Ruma<get_room_visibility::v3::IncomingRequest>,
) -> Result<get_room_visibility::v3::Response> {
if !db.rooms.exists(&body.room_id)? {
if !services().rooms.metadata.exists(&body.room_id)? {
// Return 404 if the room doesn't exist
return Err(Error::BadRequest(
ErrorKind::NotFound,