Skip to content

Commit

Permalink
fix: setup wizard doesn't redirect after completion
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Feb 12, 2023
1 parent 2a826f7 commit 7cd9dff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -76,7 +76,7 @@ const AdminConfigTable = () => {
.updateMany(updatedConfigVariables)
.then(async () => {
await configService.finishSetup();
router.replace("/upload");
router.reload();
})
.catch(toast.axiosError);
} else {
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/middleware.ts
Expand Up @@ -57,6 +57,10 @@ export async function middleware(request: NextRequest) {
routes.disabled.routes.push("/auth/resetPassword*");
}

if (getConfig("SETUP_STATUS") == "FINISHED") {
routes.disabled.routes.push("/admin/setup");
}

// prettier-ignore
const rules = [
// Disabled routes
Expand Down

0 comments on commit 7cd9dff

Please sign in to comment.