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" });
    });
}
