This commit is contained in:
headlesdev
2025-05-19 16:51:32 +02:00
parent 59a32e0407
commit 2dea29287a
3 changed files with 71 additions and 29 deletions

View File

@@ -14,12 +14,11 @@ export default function Login() {
useEffect(() => {
const init = async () => {
const response = await axios.get("/api/user/init");
if (response.data.message === "No users found") {
await axios.get("/api/user/init").then(() => {
router.push("/setup");
} else {
setLoading(false);
}
}).catch((error) => {
console.error(error);
});
};
init();