add: ability to transfer community ownership

This commit is contained in:
trisua 2025-04-24 16:57:25 -04:00
parent d42375441f
commit 0c814e95d7
5 changed files with 139 additions and 2 deletions

View file

@ -64,6 +64,10 @@ pub fn routes() -> Router {
"/communities/{id}/access/join",
post(communities::communities::update_join_access_request),
)
.route(
"/communities/{id}/transfer_ownership",
post(communities::communities::update_owner_request),
)
.route(
"/communities/{id}/upload/avatar",
post(communities::images::upload_avatar_request),
@ -342,6 +346,11 @@ pub struct UpdateMembershipRole {
pub role: CommunityPermission,
}
#[derive(Deserialize)]
pub struct UpdateCommunityOwner {
pub user: String,
}
#[derive(Deserialize)]
pub struct UpdateUserRole {
pub role: FinePermission,