Skip to content

Commit

Permalink
src: server: manager: Fix openapi thumbnail route
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Dec 10, 2024
1 parent ebc00fe commit 81a5fee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib/server/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub async fn run(server_address: &str) -> Result<(), std::io::Error> {
.route("/sdp", web::get().to(pages::sdp))
.route("/log", web::get().to(pages::log))
.service(
web::scope("/thumbnail")
web::scope("")
// Add a rate limitter to prevent flood
.wrap(
RateLimiter::builder(
Expand All @@ -90,7 +90,7 @@ pub async fn run(server_address: &str) -> Result<(), std::io::Error> {
.add_headers()
.build(),
)
.route("", web::get().to(pages::thumbnail)),
.route("thumbnail", web::get().to(pages::thumbnail)),
)
.route("/onvif/devices", web::get().to(pages::onvif_devices))
.route(
Expand Down
7 changes: 2 additions & 5 deletions src/lib/server/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use actix_web::{
web::{self, Json},
HttpRequest, HttpResponse,
};
use paperclip::actix::{api_v2_operation, Apiv2Schema, CreatedJson, NoContent};
use paperclip::actix::{api_v2_operation, Apiv2Schema, CreatedJson};
use serde::{Deserialize, Serialize};
use tracing::*;
use validator::Validate;
Expand All @@ -16,10 +16,7 @@ use crate::{
helper,
server::error::{Error, Result},
settings,
stream::{
gst as gst_stream, manager as stream_manager,
types::{StreamInformation, StreamStatus},
},
stream::{gst as gst_stream, manager as stream_manager, types::StreamInformation},
video::{
types::{Format, VideoSourceType},
video_source::{self, VideoSource, VideoSourceFormats},
Expand Down

0 comments on commit 81a5fee

Please sign in to comment.