From b7fdc41417f044961a934e2e4c2a13244f4234ea Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 26 Nov 2024 15:25:05 +0100 Subject: [PATCH] remove new features from api v3 --- src/api_routes_v3.rs | 58 +++----------------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/src/api_routes_v3.rs b/src/api_routes_v3.rs index a36f8b7b1..65d50e1b6 100644 --- a/src/api_routes_v3.rs +++ b/src/api_routes_v3.rs @@ -17,12 +17,6 @@ use lemmy_api::{ block::block_community, follow::follow_community, hide::hide_community, - pending_follows::{ - approve::post_pending_follows_approve, - count::get_pending_follows_count, - list::get_pending_follows_list, - }, - random::get_random_community, transfer::transfer_community, }, local_user::{ @@ -60,7 +54,6 @@ use lemmy_api::{ like::like_post, list_post_likes::list_post_likes, lock::lock_post, - mark_many_read::mark_posts_as_read, mark_read::mark_post_as_read, save::save_post, }, @@ -114,14 +107,8 @@ use lemmy_api_crud::{ custom_emoji::{ create::create_custom_emoji, delete::delete_custom_emoji, - list::list_custom_emojis, update::update_custom_emoji, }, - oauth_provider::{ - create::create_oauth_provider, - delete::delete_oauth_provider, - update::update_oauth_provider, - }, post::{ create::create_post, delete::delete_post, @@ -136,16 +123,7 @@ use lemmy_api_crud::{ update::update_private_message, }, site::{create::create_site, read::get_site_v3, update::update_site}, - tagline::{ - create::create_tagline, - delete::delete_tagline, - list::list_taglines, - update::update_tagline, - }, - user::{ - create::{authenticate_with_oauth, register}, - delete::delete_account, - }, + user::{create::register, delete::delete_account}, }; use lemmy_apub::api::{ list_comments::list_comments, @@ -200,7 +178,6 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .wrap(rate_limit.message()) .route("", web::get().to(get_community)) .route("", web::put().to(update_community)) - .route("/random", web::get().to(get_random_community)) .route("/hide", web::put().to(hide_community)) .route("/list", web::get().to(list_communities)) .route("/follow", web::post().to(follow_community)) @@ -210,14 +187,7 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .route("/remove", web::post().to(remove_community)) .route("/transfer", web::post().to(transfer_community)) .route("/ban_user", web::post().to(ban_from_community)) - .route("/mod", web::post().to(add_mod_to_community)) - .service( - web::scope("/pending_follows") - .wrap(rate_limit.message()) - .route("/count", web::get().to(get_pending_follows_count)) - .route("/list", web::get().to(get_pending_follows_list)) - .route("/approve", web::post().to(post_pending_follows_approve)), - ), + .route("/mod", web::post().to(add_mod_to_community)), ) .service( web::scope("/federated_instances") @@ -240,7 +210,6 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .route("/delete", web::post().to(delete_post)) .route("/remove", web::post().to(remove_post)) .route("/mark_as_read", web::post().to(mark_post_as_read)) - .route("/mark_many_as_read", web::post().to(mark_posts_as_read)) .route("/hide", web::post().to(hide_post)) .route("/lock", web::post().to(lock_post)) .route("/feature", web::post().to(feature_post)) @@ -404,14 +373,6 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .route("/community", web::post().to(purge_community)) .route("/post", web::post().to(purge_post)) .route("/comment", web::post().to(purge_comment)), - ) - .service( - web::scope("/tagline") - .wrap(rate_limit.message()) - .route("", web::post().to(create_tagline)) - .route("", web::put().to(update_tagline)) - .route("/delete", web::post().to(delete_tagline)) - .route("/list", web::get().to(list_taglines)), ), ) .service( @@ -419,20 +380,7 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .wrap(rate_limit.message()) .route("", web::post().to(create_custom_emoji)) .route("", web::put().to(update_custom_emoji)) - .route("/delete", web::post().to(delete_custom_emoji)) - .route("/list", web::get().to(list_custom_emojis)), - ) - .service( - web::scope("/oauth_provider") - .wrap(rate_limit.message()) - .route("", web::post().to(create_oauth_provider)) - .route("", web::put().to(update_oauth_provider)) - .route("/delete", web::post().to(delete_oauth_provider)), - ) - .service( - web::scope("/oauth") - .wrap(rate_limit.register()) - .route("/authenticate", web::post().to(authenticate_with_oauth)), + .route("/delete", web::post().to(delete_custom_emoji)), ), ); cfg.service(