mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
16 lines
447 B
JavaScript
16 lines
447 B
JavaScript
export default async function ({ $config, req, res, redirect, route, error }) {
|
|
if (process.server) {
|
|
if (res.locals.status === 'SETUP' && route.path !== '/setup/0') {
|
|
return redirect('/setup/0')
|
|
}
|
|
|
|
if (res.locals.status === 'DBCONF' && route.path !== '/setup/1') {
|
|
return redirect('/setup/1')
|
|
}
|
|
|
|
if (res.locals.status === 'READY' && route.path.startsWith('/setup')) {
|
|
return redirect('/')
|
|
}
|
|
}
|
|
|
|
}
|