fix compiler error

This commit is contained in:
2026-03-31 23:17:56 -04:00
parent 120392e11b
commit b35a130c3a
2 changed files with 15 additions and 6 deletions

View File

@@ -347,10 +347,7 @@ fn app_router(state: Arc<AppState>) -> Router {
"/api/settings/watch-dirs",
get(get_watch_dirs_handler).post(add_watch_dir_handler),
)
.route(
"/api/settings/folders",
post(sync_watch_dirs_handler),
)
.route("/api/settings/folders", post(sync_watch_dirs_handler))
.route(
"/api/settings/watch-dirs/:id",
delete(remove_watch_dir_handler),

View File

@@ -433,7 +433,13 @@ pub(crate) async fn add_notification_handler(
State(state): State<Arc<AppState>>,
axum::Json(payload): axum::Json<AddNotificationTargetPayload>,
) -> impl IntoResponse {
if let Err(msg) = validate_notification_url(&payload.endpoint_url).await {
let allow_local = state
.config
.read()
.await
.notifications
.allow_local_notifications;
if let Err(msg) = validate_notification_url(&payload.endpoint_url, allow_local).await {
return (StatusCode::BAD_REQUEST, msg).into_response();
}
@@ -507,7 +513,13 @@ pub(crate) async fn test_notification_handler(
State(state): State<Arc<AppState>>,
axum::Json(payload): axum::Json<AddNotificationTargetPayload>,
) -> impl IntoResponse {
if let Err(msg) = validate_notification_url(&payload.endpoint_url).await {
let allow_local = state
.config
.read()
.await
.notifications
.allow_local_notifications;
if let Err(msg) = validate_notification_url(&payload.endpoint_url, allow_local).await {
return (StatusCode::BAD_REQUEST, msg).into_response();
}