add: developer panel

This commit is contained in:
trisua 2025-06-14 20:26:54 -04:00
parent ebded00fd3
commit 39574df691
44 changed files with 982 additions and 84 deletions

View file

@ -24,6 +24,7 @@ use tetratto_core::model::{
PollOption, PostContext,
},
communities_permissions::CommunityPermission,
oauth::AppScope,
permissions::FinePermission,
reactions::AssetType,
stacks::{StackMode, StackPrivacy, StackSort},
@ -348,6 +349,14 @@ pub fn routes() -> Router {
"/auth/user/{id}/followers",
get(auth::social::followers_request),
)
.route(
"/auth/user/{id}/grants/{app}",
delete(auth::profile::remove_grant_request),
)
.route(
"/auth/user/{id}/grants/{app}/refresh",
post(auth::profile::refresh_grant_request),
)
// apps
.route("/apps", post(apps::create_request))
.route("/apps/{id}/title", post(apps::update_title_request))
@ -357,7 +366,9 @@ pub fn routes() -> Router {
"/apps/{id}/quota_status",
post(apps::update_quota_status_request),
)
.route("/apps/{id}/scopes", post(apps::update_scopes_request))
.route("/apps/{id}", delete(apps::delete_request))
.route("/apps/{id}/grant", post(apps::grant_request))
// warnings
.route("/warnings/{id}", get(auth::user_warnings::get_request))
.route("/warnings/{id}", post(auth::user_warnings::create_request))
@ -816,3 +827,18 @@ pub struct UpdateAppRedirect {
pub struct UpdateAppQuotaStatus {
pub quota_status: AppQuota,
}
#[derive(Deserialize)]
pub struct UpdateAppScopes {
pub scopes: Vec<AppScope>,
}
#[derive(Deserialize)]
pub struct CreateGrant {
pub challenge: String,
}
#[derive(Deserialize)]
pub struct RefreshGrantToken {
pub verifier: String,
}