16 lines
335 B
TypeScript
16 lines
335 B
TypeScript
import NProgress from "nprogress";
|
|
import { http } from "@/serverCom";
|
|
|
|
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" });
|
|
});
|
|
}
|