New login screen (#1331)
* wip * feat: first draft of auth.config * chore: auth methodS * chore: styling * styling, styling, styling * feat: Auth notices * chore: Remove server-rendered pages, move shared/components -> components * lint * cleanup * cleanup * fix: Remove unused component * fix: Ensure env variables in prod too * style tweaks * fix: Entering SSO email into login form fails fix: Tweak language around guest signin
This commit is contained in:
@ -34,6 +34,7 @@ class ApiClient {
|
||||
) => {
|
||||
let body;
|
||||
let modifiedPath;
|
||||
let urlToFetch;
|
||||
|
||||
if (method === "GET") {
|
||||
if (data) {
|
||||
@ -45,6 +46,12 @@ class ApiClient {
|
||||
body = data ? JSON.stringify(data) : undefined;
|
||||
}
|
||||
|
||||
if (path.match(/^http/)) {
|
||||
urlToFetch = modifiedPath || path;
|
||||
} else {
|
||||
urlToFetch = this.baseUrl + (modifiedPath || path);
|
||||
}
|
||||
|
||||
// Construct headers
|
||||
const headers = new Headers({
|
||||
Accept: "application/json",
|
||||
@ -60,7 +67,7 @@ class ApiClient {
|
||||
|
||||
let response;
|
||||
try {
|
||||
response = await fetch(this.baseUrl + (modifiedPath || path), {
|
||||
response = await fetch(urlToFetch, {
|
||||
method,
|
||||
body,
|
||||
headers,
|
||||
|
Reference in New Issue
Block a user