Skip to content

Commit

Permalink
Fixed gpodder sync
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Dec 10, 2024
1 parent f61d1be commit c02698d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/adapters/api/controllers/device_controller.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::gpodder::device::dto::device_post::DevicePost;
use crate::models::session::Session;
use crate::utils::error::CustomError;
use actix_web::{get, post, Scope};
use actix_web::{get, post};
use actix_web::{web, HttpResponse};
use crate::adapters::api::models::device::device_response::DeviceResponse;
use crate::adapters::api::models::device::device_create::DeviceCreate;
Expand Down Expand Up @@ -62,9 +62,3 @@ pub async fn get_devices_of_user(
None => Err(CustomError::Forbidden),
}
}

pub fn device_routes() -> Scope {
Scope::new("")
.service(post_device)
.service(get_devices_of_user)
}
5 changes: 3 additions & 2 deletions src/adapters/api/controllers/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use actix_web::dev::{ServiceFactory, ServiceRequest, ServiceResponse};
use actix_web::web::redirect;
use utoipa::OpenApi;
use utoipa_swagger_ui::SwaggerUi;
use crate::adapters::api::controllers::device_controller::device_routes;
use crate::adapters::api::controllers::device_controller::{get_devices_of_user, post_device};
use crate::constants::inner_constants::ENVIRONMENT_SERVICE;
use crate::controllers::api_doc::ApiDoc;
use crate::controllers::podcast_controller::proxy_podcast;
Expand Down Expand Up @@ -63,7 +63,8 @@ fn get_authenticated_gpodder() -> Scope<
> {
web::scope("")
.wrap(crate::gpodder::session_middleware::CookieFilter::new())
.service(device_routes())
.service(post_device)
.service(get_devices_of_user)
.service(get_subscriptions)
.service(upload_subscription_changes)
.service(crate::gpodder::episodes::gpodder_episodes::get_episode_actions)
Expand Down

0 comments on commit c02698d

Please sign in to comment.