From 0ca256d5af00307b1c91a38b6aad2df2ed46fb24 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Mon, 29 Jan 2024 11:55:16 +0000 Subject: Clearer syntax for query string hack --- src/lib/api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/api.ts') diff --git a/src/lib/api.ts b/src/lib/api.ts index da89ac3..0b52658 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -60,7 +60,9 @@ export async function getRegistrationOptions( // If last param ends with, e.g., `.com` as in an email address, the `.com` // will be interpreted as a file extension, and this will break everything. // Hack to avoid this bug. - const response = await fetch(`${backendUrl}/auth/registration?${queryString}&hack=toavoidbug`, { + const hackyQueryString = `${queryString}&hack=toavoidbug`; + + const response = await fetch(`${backendUrl}/auth/registration?${hackyQueryString}`, { method: 'GET', headers: { 'Content-Type': 'application/json' }, }); -- cgit v1.2.3