Skip to content

Commit

Permalink
skip projects with no issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jan 9, 2025
1 parent 8e754cf commit 0409fce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/labrinth/src/routes/internal/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use sqlx::PgPool;
use std::collections::HashMap;
use std::net::Ipv4Addr;
use std::sync::Arc;
use log::info;

pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(
Expand Down Expand Up @@ -197,6 +198,11 @@ pub async fn delphi_result_ingest(
redis: web::Data<RedisPool>,
body: web::Json<DelphiIngest>,
) -> Result<HttpResponse, ApiError> {
if body.issues.is_empty() {
info!("No issues found for file {}", body.url);
return Ok(HttpResponse::NoContent().finish());
}

let webhook_url = dotenvy::var("DELPHI_SLACK_WEBHOOK")?;

let project = crate::database::models::Project::get_id(
Expand Down

0 comments on commit 0409fce

Please sign in to comment.