2024-08-25 11:37:23 +00:00
|
|
|
import NProgress from "nprogress";
|
2024-09-17 14:44:02 +00:00
|
|
|
import { http } from "@/serverCom";
|
2024-08-25 11:37:23 +00:00
|
|
|
|
|
|
|
export async function isSetup(to: any, from: any, next: any) {
|
|
|
|
NProgress.start();
|
|
|
|
await http
|
|
|
|
.get("/setup")
|
|
|
|
.then(() => {
|
|
|
|
NProgress.done();
|
|
|
|
next();
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
NProgress.done();
|
|
|
|
next({ name: "login" });
|
|
|
|
});
|
|
|
|
}
|