summaryrefslogtreecommitdiff
path: root/src/lib/api.ts
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2024-01-29 11:55:16 +0000
committerJoe Carstairs <jcarstairs@scottlogic.com>2024-01-29 11:55:16 +0000
commit0ca256d5af00307b1c91a38b6aad2df2ed46fb24 (patch)
tree2d60f1a697a078b033a701b28fd8ba714a50acac /src/lib/api.ts
parentad2a780f5bb3e48d95ad2724eb4868bf43883c32 (diff)
Clearer syntax for query string hack
Diffstat (limited to 'src/lib/api.ts')
-rw-r--r--src/lib/api.ts4
1 files changed, 3 insertions, 1 deletions
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' },
});