Fix: Use channel_invites collection name instead of invites.

Was conflicting with invite-only rauth registrations.
This commit is contained in:
Paul
2021-06-12 10:33:31 +01:00
parent 9be9b76035
commit 6b8158bf54
9 changed files with 15 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
Err(Error::MissingPermission)?
}
let mut cursor = get_collection("invites")
let mut cursor = get_collection("channel_invites")
.find(
doc! {
"server": target.id
@@ -37,7 +37,7 @@ pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
.await
.map_err(|_| Error::DatabaseError {
operation: "find",
with: "invites",
with: "channel_invites",
})?;
let mut invites = vec![];