feat: add GOPROXY + fix on saved inputs

This commit is contained in:
Ruben Fiszel
2023-05-18 17:29:37 +02:00
parent 391d22048d
commit dc1bfbb5f5
9 changed files with 73 additions and 29 deletions

View File

@@ -405,6 +405,15 @@ async fn get_folder_usage(
.await?
.unwrap_or(0);
let raw_apps = sqlx::query_scalar!(
"SELECT count(path) FROM raw_app WHERE path LIKE 'f/' || $1 || '%' AND workspace_id = $2",
name,
w_id
)
.fetch_one(&mut tx)
.await?
.unwrap_or(0);
let resources = sqlx::query_scalar!(
"SELECT count(path) FROM resource WHERE path LIKE 'f/' || $1 || '%' AND workspace_id = $2",
name,
@@ -428,7 +437,7 @@ async fn get_folder_usage(
scripts,
flows,
schedules,
apps,
apps: apps + raw_apps,
resources,
variables,
}))

View File

@@ -169,7 +169,7 @@ async fn list_saved_inputs(
let rows = sqlx::query_as::<_, InputRow>(
"select * from input \
where runnable_id = $1 and runnable_type = $2 and workspace_id = $3 \
and is_public IS true OR created_by = $4 \
and (is_public IS true OR created_by = $4) \
order by created_at desc limit $5 offset $6",
)
.bind(&r.runnable_id)