prevent side effects if groups are disabled (#4265)

This commit is contained in:
Stefan Melmuk
2024-01-25 22:02:07 +01:00
committed by GitHub
parent 5e46a43306
commit 1b801406d6
4 changed files with 226 additions and 126 deletions

View File

@@ -294,7 +294,7 @@ async fn post_organization(
async fn get_user_collections(headers: Headers, mut conn: DbConn) -> Json<Value> {
Json(json!({
"Data":
Collection::find_by_user_uuid(headers.user.uuid.clone(), &mut conn).await
Collection::find_by_user_uuid(headers.user.uuid, &mut conn).await
.iter()
.map(Collection::to_json)
.collect::<Value>(),