Skip to content

Commit

Permalink
fix(middleware): fix middleware bu
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadreza1388 committed Sep 11, 2024
1 parent 1c11f39 commit 9dd8bca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Middleware/api/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ public function before(): void
$user = end($user);
if (intval($user['role_id']) !== 1) {
Flight::redirect("https://editor.salamlang.ir");
}
exit(); }
} else {
Flight::redirect("https://editor.salamlang.ir");
exit();
}
}
}
2 changes: 2 additions & 0 deletions app/Middleware/api/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ public function before(): void
$result = end($result)['token_count'];
if (intval($result) === 0) {
Flight::redirect("https://editor.salamlang.ir");
exit();
}
} else {
Flight::redirect("https://editor.salamlang.ir");
exit();
}
}
}
2 changes: 2 additions & 0 deletions app/Middleware/mvc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ public function before(): void
$user = end($user);
if (intval($user['role_id']) !== 1) {
Flight::redirect("https://editor.salamlang.ir");
exit();
}
} else {
Flight::redirect("https://editor.salamlang.ir");
exit();
}
}
}

0 comments on commit 9dd8bca

Please sign in to comment.