I should really check linting more often

Paul Fitzpatrick 3 weeks ago
parent 485d5af268
commit a63fea5028
No known key found for this signature in database
GPG Key ID: 07F16BF3214888F6

@ -62,7 +62,7 @@ export class BaseAPI {
...options.headers
};
if ((window as any)?.isGristBootPage) {
const parts = (new URL(window.location.href).pathname).split('/')
const parts = (new URL(window.location.href).pathname).split('/');
if (parts[0] === '' && parts[1] === 'boot' && parts[2] !== undefined) {
this._headers['X-Boot-Key'] = parts[2];
}

@ -105,6 +105,9 @@ const _statusCheckProbe: Probe = {
const baseUrl = server.getHomeUrl(req);
const url = new URL(baseUrl);
url.pathname = removeTrailingSlash(url.pathname) + '/status';
const details = {
url: url.href,
};
try {
const resp = await fetch(url);
if (resp.status !== 200) {
@ -116,10 +119,12 @@ const _statusCheckProbe: Probe = {
}
return {
success: true,
details,
};
} catch (e) {
return {
success: false,
details,
error: String(e),
severity: 'fault',
};

@ -53,7 +53,7 @@ export class SimpleInstallAdmin extends InstallAdmin {
}
public override async isAdminUser(user: User): Promise<boolean> {
if (user.id === this._dbManager.getSupportUserId()) { return true;}
if (user.id === this._dbManager.getSupportUserId()) { return true; }
return this._installAdminEmail ? (user.loginEmail === this._installAdminEmail) : false;
}
}

Loading…
Cancel
Save