Remove deprecated Subscription API methods
This commit is contained in:
parent
78b9fc7878
commit
596c13c0bb
2 changed files with 4 additions and 8 deletions
|
@ -27,10 +27,6 @@ use crate::mastodon_api::pagination::get_paginated_response;
|
|||
use crate::mastodon_api::search::helpers::search_profiles_only;
|
||||
use crate::mastodon_api::statuses::helpers::build_status_list;
|
||||
use crate::mastodon_api::statuses::types::Status;
|
||||
use crate::mastodon_api::subscriptions::views::{
|
||||
authorize_subscription,
|
||||
subscriptions_enabled,
|
||||
};
|
||||
use crate::models::posts::queries::get_posts_by_author;
|
||||
use crate::models::profiles::queries::{
|
||||
get_profile_by_id,
|
||||
|
@ -597,8 +593,6 @@ pub fn account_api_scope() -> Scope {
|
|||
.service(get_relationships_view)
|
||||
.service(search_by_acct)
|
||||
.service(search_by_did)
|
||||
.route("/authorize_subscription", web::get().to(authorize_subscription))
|
||||
.route("/subscriptions_enabled", web::post().to(subscriptions_enabled))
|
||||
// Routes with account ID
|
||||
.service(get_account)
|
||||
.service(follow_account)
|
||||
|
|
|
@ -37,6 +37,7 @@ use super::types::{
|
|||
SubscriptionQueryParams,
|
||||
};
|
||||
|
||||
#[get("/authorize")]
|
||||
pub async fn authorize_subscription(
|
||||
auth: BearerAuth,
|
||||
config: web::Data<Config>,
|
||||
|
@ -77,6 +78,7 @@ async fn get_subscription_options(
|
|||
Ok(HttpResponse::Ok().json(options))
|
||||
}
|
||||
|
||||
#[post("/enable")]
|
||||
pub async fn subscriptions_enabled(
|
||||
auth: BearerAuth,
|
||||
config: web::Data<Config>,
|
||||
|
@ -210,9 +212,9 @@ async fn get_invoice(
|
|||
|
||||
pub fn subscription_api_scope() -> Scope {
|
||||
web::scope("/api/v1/subscriptions")
|
||||
.route("/authorize", web::get().to(authorize_subscription))
|
||||
.service(authorize_subscription)
|
||||
.service(get_subscription_options)
|
||||
.route("/enable", web::post().to(subscriptions_enabled))
|
||||
.service(subscriptions_enabled)
|
||||
.service(find_subscription)
|
||||
.service(create_invoice_view)
|
||||
.service(get_invoice)
|
||||
|
|
Loading…
Reference in a new issue