mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 16:05:58 +00:00
support wmill api calls without special $res: or s3:// syntax
This commit is contained in:
@@ -65,14 +65,10 @@ impl<'a> AssetsFinder<'a> {
|
||||
|
||||
match &node.args[0] {
|
||||
Expr::Constant(ExprConstant { value: Constant::Str(value), .. }) => {
|
||||
if let Some((k, path)) = parse_asset_syntax(value.as_str()) {
|
||||
if k != kind {
|
||||
return Err(());
|
||||
}
|
||||
self.paths_storage.push(path.to_string());
|
||||
self.assets
|
||||
.push(ParseAssetsResult { kind, path: "", access_type });
|
||||
}
|
||||
let path = parse_asset_syntax(&value).map(|(_, p)| p).unwrap_or(&value);
|
||||
self.paths_storage.push(path.to_string());
|
||||
self.assets
|
||||
.push(ParseAssetsResult { kind, path: "", access_type });
|
||||
}
|
||||
_ => return Err(()),
|
||||
};
|
||||
|
||||
@@ -95,14 +95,10 @@ impl<'a> AssetsFinder<'a> {
|
||||
}
|
||||
match node.args[0].expr.as_ref() {
|
||||
Expr::Lit(Lit::Str(Str { value, .. })) => {
|
||||
if let Some((k, path)) = parse_asset_syntax(value.as_str()) {
|
||||
if k != kind {
|
||||
return Err(());
|
||||
}
|
||||
self.paths_storage.push(path.to_string());
|
||||
self.assets
|
||||
.push(ParseAssetsResult { kind, path: "", access_type });
|
||||
}
|
||||
let path = parse_asset_syntax(&value).map(|(_, p)| p).unwrap_or(&value);
|
||||
self.paths_storage.push(path.to_string());
|
||||
self.assets
|
||||
.push(ParseAssetsResult { kind, path: "", access_type });
|
||||
}
|
||||
_ => return Err(()),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user