17 lines
336 B
TypeScript
17 lines
336 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" });
|
||
|
});
|
||
|
}
|