fix backend compile

This commit is contained in:
Ruben Fiszel
2023-06-06 11:01:49 +02:00
parent 74254af71a
commit 21546d4550
2 changed files with 1 additions and 16 deletions
-14
View File
@@ -895,17 +895,3 @@ async fn delete_script_by_path(
Ok(Json(script))
}
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
enum SigParsing {
Valid(MainArgSignature),
Invalid { error: String },
}
fn result_to_sig_parsing(result: Result<MainArgSignature>) -> Json<SigParsing> {
match result {
Ok(sig) => Json(SigParsing::Valid(sig)),
Err(e) => Json(SigParsing::Invalid { error: e.to_string() }),
}
}
+1 -2
View File
@@ -1512,8 +1512,7 @@ async fn handle_deno_job(
let write_wrapper_f = async {
// let mut start = Instant::now();
let args = windmill_parser_ts::parse_deno_signature(inner_content, true)
.map_err(|e| Error::BadRequest(e))?.args;
let args = windmill_parser_ts::parse_deno_signature(inner_content, true)?.args;
let dates = args.iter().enumerate().filter_map(|(i, x)| if matches!(x.typ, Typ::Datetime) {
Some(i)
} else {