extend the runtime status with more modes

This commit is contained in:
Jacob Overgaard
2022-07-26 16:07:31 +02:00
parent 0b10b13358
commit 17d91c1c38
3 changed files with 3 additions and 3 deletions

View File

@@ -1,3 +1,3 @@
# Copy this to .env.local and change what you want to test.
VITE_UMBRACO_INSTALL_STATUS=true
VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade
VITE_UMBRACO_INSTALL_PRECONFIGURED=false

View File

@@ -8,7 +8,7 @@ export const handlers = [
// Respond with a 200 status code
ctx.status(200),
ctx.json<StatusResponse>({
serverStatus: import.meta.env.VITE_UMBRACO_INSTALL_STATUS !== 'false' ? 'running' : 'must-install',
serverStatus: import.meta.env.VITE_UMBRACO_INSTALL_STATUS,
})
);
}),

View File

@@ -1,5 +1,5 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
VITE_UMBRACO_INSTALL_STATUS: string;
VITE_UMBRACO_INSTALL_STATUS: 'running' | 'must-upgrade' | 'must-install';
VITE_UMBRACO_INSTALL_PRECONFIGURED: string;
}