Create Site & Network on setup

This commit is contained in:
headlesdev
2025-05-19 21:41:46 +02:00
parent 2dea29287a
commit 6301997eac
5 changed files with 127 additions and 16 deletions

View File

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