Fix copy-curl with API key

https://feedback.yaak.app/p/copy-as-curl-bug-when-auth-use-api-key-with
This commit is contained in:
Gregory Schier
2025-11-05 10:21:26 -08:00
parent 32d56f2274
commit dc0c1decee
2 changed files with 42 additions and 36 deletions

View File

@@ -46,7 +46,7 @@ export async function convertToCurl(request: Partial<HttpRequest>) {
// Add API key authentication
if (request.authenticationType === 'apikey') {
if (request.authentication?.location === 'query') {
const sep = request.url?.includes('?') ? '&' : '?';
const sep = finalUrl.includes('?') ? '&' : '?';
finalUrl = [
finalUrl,
sep,