Fix GQL introspection and bearer auth templating

This commit is contained in:
Gregory Schier
2023-10-30 08:07:34 -07:00
parent 9d4f4bef5d
commit 7ce4ac3239
3 changed files with 6 additions and 3 deletions

View File

@@ -65,13 +65,14 @@ async fn migrate_db(
#[tauri::command] #[tauri::command]
async fn send_ephemeral_request( async fn send_ephemeral_request(
request: models::HttpRequest, request: models::HttpRequest,
environment_id: &str, environment_id: Option<&str>,
app_handle: AppHandle<Wry>, app_handle: AppHandle<Wry>,
db_instance: State<'_, Mutex<Pool<Sqlite>>>, db_instance: State<'_, Mutex<Pool<Sqlite>>>,
) -> Result<models::HttpResponse, String> { ) -> Result<models::HttpResponse, String> {
let pool = &*db_instance.lock().await; let pool = &*db_instance.lock().await;
let response = models::HttpResponse::default(); let response = models::HttpResponse::default();
return actually_send_ephemeral_request(request, &response, &environment_id, &app_handle, pool) let environment_id2 = environment_id.unwrap_or("n/a").to_string();
return actually_send_ephemeral_request(request, &response, &environment_id2, &app_handle, pool)
.await; .await;
} }

View File

@@ -8,7 +8,7 @@
}, },
"package": { "package": {
"productName": "Yaak", "productName": "Yaak",
"version": "2023.1.6" "version": "2023.1.7"
}, },
"tauri": { "tauri": {
"windows": [], "windows": [],

View File

@@ -15,6 +15,8 @@ export function BearerAuth({ requestId, authentication }: Props) {
<VStack className="my-2" space={2}> <VStack className="my-2" space={2}>
<Input <Input
useTemplating useTemplating
autocompleteVariables
type="password"
label="Token" label="Token"
name="token" name="token"
size="sm" size="sm"