From c0df9a5e203240cc3a7e4fcc8b7e489882fe75bb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 11 Jan 2023 07:08:58 +0100 Subject: [PATCH] update axum --- backend/windmill-api/openapi.yaml | 39 ++++++------ backend/windmill-api/src/apps.rs | 8 +-- backend/windmill-api/src/jobs.rs | 42 +++++++------ backend/windmill-api/src/lib.rs | 12 ++-- backend/windmill-api/src/oauth2.rs | 23 ++++--- backend/windmill-api/src/schedule.rs | 2 +- backend/windmill-api/src/static_assets.rs | 23 ++++--- backend/windmill-api/src/users.rs | 63 +++++++++++-------- backend/windmill-common/src/error.rs | 2 +- .../lib/components/FlowStatusViewer.svelte | 2 +- .../apps/editor/AppEditorHeader.svelte | 1 + .../flows/content/CapturePayload.svelte | 8 +-- .../(root)/(logged)/audit_logs/+page.svelte | 2 +- 13 files changed, 126 insertions(+), 101 deletions(-) diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index ac3a52a111..26b44b4e80 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -2706,7 +2706,7 @@ paths: schema: $ref: "#/components/schemas/AppWithLastVersion" - /w/{workspace}/apps/public_app/{path}: + /w/{workspace}/apps_u/public_app/{path}: get: summary: get public app by secret operationId: getPublicAppBySecret @@ -2843,7 +2843,7 @@ paths: schema: type: string - /w/{workspace}/apps/execute_component/{path}: + /w/{workspace}/apps_u/execute_component/{path}: post: summary: executeComponent operationId: executeComponent @@ -3151,7 +3151,7 @@ paths: items: $ref: "#/components/schemas/Job" - /w/{workspace}/jobs/get/{id}: + /w/{workspace}/jobs_u/get/{id}: get: summary: get job operationId: getJob @@ -3185,7 +3185,7 @@ paths: # schema: # type: string - /w/{workspace}/jobs/getupdate/{id}: + /w/{workspace}/jobs_u/getupdate/{id}: get: summary: get job updates operationId: getJobUpdates @@ -3343,7 +3343,7 @@ paths: - resume - cancel - /w/{workspace}/jobs/resume/{id}/{resume_id}/{signature}: + /w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}: get: summary: resume a job for a suspended flow operationId: resumeSuspendedJobGet @@ -3433,7 +3433,7 @@ paths: schema: type: string - /w/{workspace}/jobs/cancel/{id}/{resume_id}/{signature}: + /w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}: get: summary: cancel a job for a suspended flow operationId: cancelSuspendedJobGet @@ -3500,7 +3500,7 @@ paths: schema: type: string - /w/{workspace}/jobs/get_flow/{id}/{resume_id}/{signature}: + /w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}: get: summary: get parent flow job of suspended job operationId: getSuspendedJobFlow @@ -4265,6 +4265,20 @@ paths: schema: type: string + + /w/{workspace}/capture_u/{path}: + post: + summary: update flow preview capture + operationId: updateCapture + tags: + - capture + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + responses: + "204": + description: flow preview captured + /w/{workspace}/capture/{path}: put: summary: create flow preview capture @@ -4277,17 +4291,6 @@ paths: responses: "201": description: flow preview capture created - post: - summary: update flow preview capture - operationId: updateCapture - tags: - - capture - parameters: - - $ref: "#/components/parameters/WorkspaceId" - - $ref: "#/components/parameters/Path" - responses: - "204": - description: flow preview captured get: summary: get flow preview capture operationId: getCapture diff --git a/backend/windmill-api/src/apps.rs b/backend/windmill-api/src/apps.rs index 3ed1d9824a..187dd5b777 100644 --- a/backend/windmill-api/src/apps.rs +++ b/backend/windmill-api/src/apps.rs @@ -14,9 +14,9 @@ use crate::{ variables::build_crypt, }; use axum::{ - extract::{Extension, Path, Query}, + extract::{Extension, Json, Path, Query}, routing::{delete, get, post}, - Json, Router, + Router, }; use hyper::StatusCode; use magic_crypt::MagicCryptTrait; @@ -137,10 +137,10 @@ pub struct EditApp { async fn list_apps( authed: Authed, - Query(pagination): Query, - Query(lq): Query, Extension(user_db): Extension, Path(w_id): Path, + Query(pagination): Query, + Query(lq): Query, ) -> JsonResult> { let (per_page, offset) = paginate(pagination); diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index f5a2d35277..56813f525c 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -10,13 +10,14 @@ use std::sync::Arc; use anyhow::Context; use axum::{ - extract::{FromRequest, Path, Query}, + extract::{FromRequest, Json, Path, Query}, response::{IntoResponse, Response}, routing::{get, post}, - Extension, Json, Router, + Extension, Router, }; +use base64::Engine; use hmac::Mac; -use hyper::{HeaderMap, StatusCode}; +use hyper::{HeaderMap, Request, StatusCode}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use sql_builder::{prelude::*, quote, SqlBuilder}; use sqlx::{query_scalar, types::Uuid, FromRow, Postgres, Transaction}; @@ -552,8 +553,8 @@ pub async fn resume_suspended_job( /* unauthed */ Extension(db): Extension, Path((w_id, job_id, resume_id, secret)): Path<(String, Uuid, u32, String)>, - QueryOrBody(value): QueryOrBody, Query(approver): Query, + QueryOrBody(value): QueryOrBody, ) -> error::Result { let value = value.unwrap_or(serde_json::Value::Null); let mut tx = db.begin().await?; @@ -896,7 +897,7 @@ fn build_resume_url( approver: &str, base_url: &str, ) -> String { - format!("{base_url}/api/w/{w_id}/jobs/{op}/{job_id}/{resume_id}/{signature}{approver}") + format!("{base_url}/api/w/{w_id}/jobs_u/{op}/{job_id}/{resume_id}/{signature}{approver}") } pub async fn get_resume_urls( @@ -1075,20 +1076,19 @@ struct PreviewFlow { pub struct QueryOrBody(pub Option); #[axum::async_trait] -impl FromRequest for QueryOrBody +impl FromRequest for QueryOrBody where D: DeserializeOwned, - B: Send + axum::body::HttpBody, - ::Data: Send, - ::Error: Into, + S: Send + Sync, { type Rejection = Response; async fn from_request( - req: &mut axum::extract::RequestParts, + req: Request, + state: &S, ) -> std::result::Result { return if req.method() == axum::http::Method::GET { - let Query(InPayload { payload }) = Query::from_request(req) + let Query(InPayload { payload }) = Query::from_request(req, state) .await .map_err(IntoResponse::into_response)?; payload @@ -1100,7 +1100,7 @@ where }) .unwrap_or(Ok(QueryOrBody(None))) } else { - Json::from_request(req) + Json::from_request(req, state) .await .map(|Json(v)| QueryOrBody(Some(v))) .map_err(IntoResponse::into_response) @@ -1112,7 +1112,9 @@ where } fn decode_payload>(t: T) -> anyhow::Result { - let vec = base64::decode_config(&t, base64::URL_SAFE).context("invalid base64")?; + let vec = base64::engine::general_purpose::URL_SAFE + .decode(t) + .context("invalid base64")?; serde_json::from_slice(vec.as_slice()).context("invalid json") } } @@ -1121,9 +1123,9 @@ pub async fn run_flow_by_path( authed: Authed, Extension(user_db): Extension, Path((w_id, flow_path)): Path<(String, StripPath)>, - axum::Json(args): axum::Json>>, Query(run_query): Query, headers: HeaderMap, + Json(args): Json>>, ) -> error::Result<(StatusCode, String)> { let flow_path = flow_path.to_path(); let mut tx = user_db.begin(&authed).await?; @@ -1155,9 +1157,9 @@ pub async fn run_job_by_path( authed: Authed, Extension(user_db): Extension, Path((w_id, script_path)): Path<(String, StripPath)>, - axum::Json(args): axum::Json>>, Query(run_query): Query, headers: HeaderMap, + Json(args): Json>>, ) -> error::Result<(StatusCode, String)> { let script_path = script_path.to_path(); let mut tx = user_db.begin(&authed).await?; @@ -1222,9 +1224,9 @@ pub async fn run_wait_result_job_by_path( authed: Authed, Extension(user_db): Extension, Path((w_id, script_path)): Path<(String, StripPath)>, - axum::Json(args): axum::Json>>, Query(run_query): Query, headers: HeaderMap, + Json(args): Json>>, ) -> error::JsonResult { let script_path = script_path.to_path(); let mut tx = user_db.clone().begin(&authed).await?; @@ -1259,9 +1261,9 @@ pub async fn run_wait_result_job_by_hash( authed: Authed, Extension(user_db): Extension, Path((w_id, script_hash)): Path<(String, ScriptHash)>, - axum::Json(args): axum::Json>>, Query(run_query): Query, headers: HeaderMap, + Json(args): Json>>, ) -> error::JsonResult { let hash = script_hash.0; let mut tx = user_db.clone().begin(&authed).await?; @@ -1310,9 +1312,9 @@ async fn run_preview_job( authed: Authed, Extension(user_db): Extension, Path(w_id): Path, - Json(preview): Json, Query(run_query): Query, headers: HeaderMap, + Json(preview): Json, ) -> error::Result<(StatusCode, String)> { let mut tx = user_db.begin(&authed).await?; let scheduled_for = run_query.get_scheduled_for(&mut tx).await?; @@ -1348,9 +1350,9 @@ async fn run_preview_flow_job( authed: Authed, Extension(user_db): Extension, Path(w_id): Path, - Json(raw_flow): Json, Query(run_query): Query, headers: HeaderMap, + Json(raw_flow): Json, ) -> error::Result<(StatusCode, String)> { let mut tx = user_db.begin(&authed).await?; let scheduled_for = run_query.get_scheduled_for(&mut tx).await?; @@ -1381,9 +1383,9 @@ pub async fn run_job_by_hash( authed: Authed, Extension(user_db): Extension, Path((w_id, script_hash)): Path<(String, ScriptHash)>, - axum::Json(args): axum::Json>>, Query(run_query): Query, headers: HeaderMap, + Json(args): Json>>, ) -> error::Result<(StatusCode, String)> { let hash = script_hash.0; let mut tx = user_db.begin(&authed).await?; diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index 33d9fe56f8..21fe631525 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -7,7 +7,7 @@ */ use argon2::Argon2; -use axum::{handler::Handler, middleware::from_extractor, routing::get, Extension, Router}; +use axum::{middleware::from_extractor, routing::get, Extension, Router}; use db::DB; use git_version::git_version; use std::{net::SocketAddr, sync::Arc}; @@ -127,9 +127,9 @@ pub async fn run_server( .nest("/audit", audit::workspaced_service()) .nest("/acls", granular_acls::workspaced_service()) .nest("/workspaces", workspaces::workspaced_service()) + .nest("/apps", apps::workspaced_service()) .nest("/flows", flows::workspaced_service()) .nest("/capture", capture::workspaced_service()) - .nest("/apps", apps::workspaced_service()) .nest("/favorites", favorite::workspaced_service()) .nest("/folders", folders::workspaced_service()), ) @@ -146,11 +146,11 @@ pub async fn run_server( .route_layer(from_extractor::()) .route_layer(from_extractor::()) .nest( - "/w/:workspace_id/apps", + "/w/:workspace_id/apps_u", apps::unauthed_service().layer(from_extractor::()), ) - .nest("/w/:workspace_id/jobs", jobs::global_service()) - .nest("/w/:workspace_id/capture", capture::global_service()) + .nest("/w/:workspace_id/jobs_u", jobs::global_service()) + .nest("/w/:workspace_id/capture_u", capture::global_service()) .nest( "/auth", users::make_unauthed_service().layer(Extension(argon2)), @@ -162,7 +162,7 @@ pub async fn run_server( .route("/version", get(git_v)) .route("/openapi.yaml", get(openapi)), ) - .fallback(static_assets::static_handler.into_service()) + .fallback(static_assets::static_handler) .layer(middleware_stack); let instance_name = rd_string(5); diff --git a/backend/windmill-api/src/oauth2.rs b/backend/windmill-api/src/oauth2.rs index 81cee619b7..486694f60e 100644 --- a/backend/windmill-api/src/oauth2.rs +++ b/backend/windmill-api/src/oauth2.rs @@ -11,10 +11,12 @@ use std::{collections::HashMap, fmt::Debug}; use std::sync::Arc; use anyhow::Context; +use axum::extract::FromRequestParts; +use axum::http::request::Parts; use axum::{ async_trait, body::Bytes, - extract::{Extension, FromRequest, Path, Query, RequestParts}, + extract::{Extension, Path, Query}, response::Redirect, routing::{get, post}, Json, Router, @@ -485,10 +487,10 @@ struct VariablePath { async fn refresh_token( authed: Authed, Path((w_id, id)): Path<(String, i32)>, - Json(VariablePath { path }): Json, Extension(user_db): Extension, Extension(clients): Extension>, Extension(http_client): Extension, + Json(VariablePath { path }): Json, ) -> error::Result { let tx = user_db.begin(&authed).await?; @@ -606,9 +608,9 @@ pub struct OAuthCallback { async fn connect_callback( cookies: Cookies, Path(client_name): Path, - Json(callback): Json, Extension(clients): Extension>, Extension(http_client): Extension, + Json(callback): Json, ) -> error::JsonResult { let client_w_scopes = &clients .connects @@ -628,10 +630,10 @@ async fn connect_slack_callback( Path(w_id): Path, authed: Authed, cookies: Cookies, - Json(callback): Json, Extension(user_db): Extension, Extension(clients): Extension>, Extension(http_client): Extension, + Json(callback): Json, ) -> error::Result { let client = clients .slack @@ -717,14 +719,17 @@ pub struct SlackSig { } #[async_trait] -impl FromRequest for SlackSig +impl FromRequestParts for SlackSig where - B: Send, + S: Send + Sync, { type Rejection = (StatusCode, String); - async fn from_request(req: &mut RequestParts) -> std::result::Result { - let hm = req.headers(); + async fn from_request_parts( + parts: &mut Parts, + _state: &S, + ) -> std::result::Result { + let hm = &parts.headers; Ok(Self { sig: hm .get("X-Slack-Signature") @@ -833,13 +838,13 @@ pub struct UserInfo { async fn login_callback( Path(client_name): Path, - Json(callback): Json, cookies: Cookies, Extension(clients): Extension>, Extension(db): Extension, Extension(http_client): Extension, Extension(is_secure): Extension>, Extension(cookie_domain): Extension>, + Json(callback): Json, ) -> error::Result { let client_w_config = &clients .logins diff --git a/backend/windmill-api/src/schedule.rs b/backend/windmill-api/src/schedule.rs index 99c21f1acf..653bd484fe 100644 --- a/backend/windmill-api/src/schedule.rs +++ b/backend/windmill-api/src/schedule.rs @@ -383,7 +383,7 @@ pub struct PreviewPayload { } fn get_offset(offset: Option) -> FixedOffset { - FixedOffset::west(offset.unwrap_or(0) * 60) + FixedOffset::west_opt(offset.unwrap_or(0) * 60).expect("Invalid offset") } #[derive(Deserialize)] diff --git a/backend/windmill-api/src/static_assets.rs b/backend/windmill-api/src/static_assets.rs index 6d8bd46bd0..2b462a609c 100644 --- a/backend/windmill-api/src/static_assets.rs +++ b/backend/windmill-api/src/static_assets.rs @@ -8,7 +8,8 @@ use axum::{ body::{self, BoxBody}, - http::{header, response::Builder, Response, Uri}, + extract::OriginalUri, + http::{header, response::Builder, Response}, response::IntoResponse, Extension, }; @@ -20,26 +21,28 @@ use std::sync::Arc; // static_handler is a handler that serves static files from the pub async fn static_handler( - uri: Uri, Extension(is_secure): Extension>, Extension(is_cloud_hosted): Extension>, Extension(csp): Extension>, -) -> impl IntoResponse { - let path = uri.path().trim_start_matches('/').to_string(); + OriginalUri(original_uri): OriginalUri, +) -> StaticFile { + let path = original_uri.path().trim_start_matches('/').to_string(); StaticFile(path, is_secure.0, is_cloud_hosted.0, csp) } #[derive(RustEmbed)] #[folder = "../../frontend/build/"] struct Asset; -pub struct StaticFile(pub T, pub bool, pub bool, pub Arc); +pub struct StaticFile( + pub String, + pub bool, + pub bool, + pub Arc, +); -impl IntoResponse for StaticFile -where - T: Into, -{ +impl IntoResponse for StaticFile { fn into_response(self) -> Response { - let path = self.0.into(); + let path = self.0; let can_set_security_headers = self.1 && self.2; let csp = self.3; serve_path(path, can_set_security_headers, csp) diff --git a/backend/windmill-api/src/users.rs b/backend/windmill-api/src/users.rs index 320b94d76d..3c01e3bcd9 100644 --- a/backend/windmill-api/src/users.rs +++ b/backend/windmill-api/src/users.rs @@ -18,8 +18,8 @@ use crate::{ use argon2::{password_hash::SaltString, Argon2, PasswordHash, PasswordHasher, PasswordVerifier}; use axum::{ async_trait, - extract::{Extension, FromRequest, Path, Query, RequestParts}, - http, + extract::{Extension, FromRequestParts, Path, Query}, + http::{self, request::Parts}, response::{IntoResponse, Response}, routing::{delete, get, post}, Json, Router, @@ -275,16 +275,16 @@ impl AuthCache { } } -async fn extract_token(req: &mut RequestParts) -> Option { - let auth_header = req - .headers() +async fn extract_token(parts: &mut Parts, state: &S) -> Option { + let auth_header = parts + .headers .get(http::header::AUTHORIZATION) .and_then(|value| value.to_str().ok()) .and_then(|s| s.strip_prefix("Bearer ")); let from_cookie = match auth_header { Some(x) => Some(x.to_owned()), - None => Extension::::from_request(req) + None => Extension::::from_request_parts(parts, state) .await .ok() .and_then(|cookies| cookies.get(COOKIE_NAME).map(|c| c.value().to_owned())), @@ -296,7 +296,7 @@ async fn extract_token(req: &mut RequestParts) -> Option { } match from_cookie { Some(token) => Some(token), - None => Query::::from_request(req) + None => Query::::from_request_parts(parts, state) .await .ok() .and_then(|token| token.token.clone()), @@ -309,21 +309,24 @@ pub struct Tokened { } #[async_trait] -impl FromRequest for Tokened +impl FromRequestParts for Tokened where - B: Send, + S: Send + Sync, { type Rejection = (StatusCode, String); - async fn from_request(req: &mut RequestParts) -> std::result::Result { - let already_tokened = req.extensions().get::(); + async fn from_request_parts( + parts: &mut Parts, + state: &S, + ) -> std::result::Result { + let already_tokened = parts.extensions.get::(); if let Some(tokened) = already_tokened { Ok(tokened.clone()) } else { - let token_o = extract_token(req).await; + let token_o = extract_token(parts, state).await; if let Some(token) = token_o { let tokened = Self { token }; - req.extensions_mut().insert(tokened.clone()); + parts.extensions.insert(tokened.clone()); Ok(tokened) } else { Err((StatusCode::UNAUTHORIZED, "Unauthorized".to_owned())) @@ -342,33 +345,38 @@ pub struct Authed { } #[async_trait] -impl FromRequest for Authed +impl FromRequestParts for Authed where - B: Send, + S: Send + Sync, { type Rejection = (StatusCode, String); - async fn from_request(req: &mut RequestParts) -> std::result::Result { - let already_authed = req.extensions().get::(); + async fn from_request_parts( + parts: &mut Parts, + state: &S, + ) -> std::result::Result { + let already_authed = parts.extensions.get::(); if let Some(authed) = already_authed { Ok(authed.clone()) } else { - let already_tokened = req.extensions().get::(); + let already_tokened = parts.extensions.get::(); let token_o = if let Some(token) = already_tokened { Some(token.token.clone()) } else { - extract_token(req).await + extract_token(parts, state).await }; - let path_vec: Vec<&str> = req.uri().path().split("/").collect(); + let path_vec: Vec<&str> = parts.uri.path().split("/").collect(); let workspace_id = if path_vec[0] == "" && path_vec[1] == "w" { Some(path_vec[2].to_owned()) } else { None }; if let Some(token) = token_o { - if let Ok(Extension(cache)) = Extension::>::from_request(req).await { + if let Ok(Extension(cache)) = + Extension::>::from_request_parts(parts, state).await + { if let Some(authed) = cache.get_authed(workspace_id.clone(), &token).await { - req.extensions_mut().insert(authed.clone()); + parts.extensions.insert(authed.clone()); Span::current().record("username", &authed.username.as_str()); Span::current().record("email", &authed.email); @@ -388,14 +396,17 @@ where pub struct OptAuthed(pub Option); #[async_trait] -impl FromRequest for OptAuthed +impl FromRequestParts for OptAuthed where - B: Send, + S: Send + Sync, { type Rejection = (StatusCode, String); - async fn from_request(req: &mut RequestParts) -> std::result::Result { - Authed::from_request(req) + async fn from_request_parts( + parts: &mut Parts, + state: &S, + ) -> std::result::Result { + Authed::from_request_parts(parts, state) .await .map(|authed| Self(Some(authed))) .or_else(|_| Ok(Self(None))) diff --git a/backend/windmill-common/src/error.rs b/backend/windmill-common/src/error.rs index 2ec0f9ef5f..8a7d014382 100644 --- a/backend/windmill-common/src/error.rs +++ b/backend/windmill-common/src/error.rs @@ -10,7 +10,7 @@ use axum::{ body::{self, BoxBody}, response::IntoResponse, - Json, + response::Json, }; #[cfg(feature = "sqlx")] diff --git a/frontend/src/lib/components/FlowStatusViewer.svelte b/frontend/src/lib/components/FlowStatusViewer.svelte index 909ef85323..0fc5e69dd5 100644 --- a/frontend/src/lib/components/FlowStatusViewer.svelte +++ b/frontend/src/lib/components/FlowStatusViewer.svelte @@ -181,7 +181,7 @@
- {:else if job.flow_status?.modules?.[job?.flow_status?.step].type === FlowStatusModule.type.WAITING_FOR_EVENTS} + {:else if job.flow_status?.modules?.[job?.flow_status?.step]?.type === FlowStatusModule.type.WAITING_FOR_EVENTS}

Waiting to be resumed

diff --git a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte index 03d2b5d93f..3e97ea7598 100644 --- a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte @@ -135,6 +135,7 @@ policy } }) + closeSaveDrawer() goto(`/apps/edit/${appId}`) } catch (e) { sendUserToast('Error creating app', e) diff --git a/frontend/src/lib/components/flows/content/CapturePayload.svelte b/frontend/src/lib/components/flows/content/CapturePayload.svelte index ede397bd9a..5953fe9948 100644 --- a/frontend/src/lib/components/flows/content/CapturePayload.svelte +++ b/frontend/src/lib/components/flows/content/CapturePayload.svelte @@ -65,13 +65,13 @@ on:click={(e) => { e.preventDefault() copyToClipboard( - `${$page.url.protocol}//${$page.url.hostname}/api/w/${$workspaceStore}/capture/${$flowStore.path}` + `${$page.url.protocol}//${$page.url.hostname}/api/w/${$workspaceStore}/capture_u/${$flowStore.path}` ) }} href="{$page.url.protocol}//{$page.url - .hostname}/api/w/{$workspaceStore}/capture/{$flowStore.path}" + .hostname}/api/w/{$workspaceStore}/capture_u/{$flowStore.path}" >{$page.url.protocol}//{$page.url - .hostname}/api/w/{$workspaceStore}/capture/{$flowStore.path} + .hostname}/api/w/{$workspaceStore}/capture_u/{$flowStore.path}
@@ -79,7 +79,7 @@
{`curl -X POST ${$page.url.protocol}//${$page.url.hostname}/api/w/${$workspaceStore}/capture/${$flowStore.path} \\
+				>{`curl -X POST ${$page.url.protocol}//${$page.url.hostname}/api/w/${$workspaceStore}/capture_u/${$flowStore.path} \\
    -H 'Content-Type: application/json' \\
    -d '{"foo": 42}'`}
diff --git a/frontend/src/routes/(root)/(logged)/audit_logs/+page.svelte b/frontend/src/routes/(root)/(logged)/audit_logs/+page.svelte index f4535175f6..3402f36303 100644 --- a/frontend/src/routes/(root)/(logged)/audit_logs/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/audit_logs/+page.svelte @@ -19,7 +19,7 @@ let pageIndex: number | undefined = Number($page.url.searchParams.get('page')) || undefined let before: string | undefined = $page.url.searchParams.get('before') ?? undefined let after: string | undefined = $page.url.searchParams.get('after') ?? undefined - let perPage: number | undefined = Number($page.url.searchParams.get('perPage')) || undefined + let perPage: number | undefined = Number($page.url.searchParams.get('perPage')) || 100 let operation: string | undefined = $page.url.searchParams.get('operation') ?? undefined let resource: string | undefined = $page.url.searchParams.get('resource') ?? undefined let actionKind: ActionKind | undefined =