Introducing the Setup Wizard for creating the first user

- no longer setup a default
- still able to do that with env vars however
This commit is contained in:
Jamie Curnow
2025-09-08 19:47:00 +10:00
parent 6ab7198e61
commit 0b2fa826e0
29 changed files with 822 additions and 615 deletions

View File

@@ -88,15 +88,19 @@ interface PostArgs {
url: string;
params?: queryString.StringifiableRecord;
data?: any;
noAuth?: boolean;
}
export async function post({ url, params, data }: PostArgs, abortController?: AbortController) {
export async function post({ url, params, data, noAuth }: PostArgs, abortController?: AbortController) {
const apiUrl = buildUrl({ url, params });
const method = "POST";
let headers = {
...buildAuthHeader(),
};
let headers: Record<string, string> = {};
if (!noAuth) {
headers = {
...buildAuthHeader(),
};
}
let body: string | FormData | undefined;
// Check if the data is an instance of FormData