add: post image uploads (supporter)
This commit is contained in:
parent
ba1f8ef063
commit
70965298b5
18 changed files with 455 additions and 50 deletions
|
@ -167,9 +167,20 @@ pub async fn list_request(jar: CookieJar, Extension(data): Extension<State>) ->
|
|||
|
||||
let mut communities: Vec<Community> = Vec::new();
|
||||
for membership in &list {
|
||||
match data.0.get_community_by_id(membership.community).await {
|
||||
match data
|
||||
.0
|
||||
.get_community_by_id_no_void(membership.community)
|
||||
.await
|
||||
{
|
||||
Ok(c) => communities.push(c),
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &None).await)),
|
||||
Err(_) => {
|
||||
// delete membership; community doesn't exist
|
||||
if let Err(e) = data.0.delete_membership(membership.id, &user).await {
|
||||
return Err(Html(render_error(e, &jar, &data, &Some(user)).await));
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue