diff --git a/frontend/index.php b/frontend/index.php
index f7a5a15..835ef63 100644
--- a/frontend/index.php
+++ b/frontend/index.php
@@ -31,9 +31,6 @@
-
-
-
@@ -78,23 +75,31 @@
route('GET', '/', 'home');
- $R->route('GET', '/beer/add', 'beer_add');
- $R->route('GET', '/review/add', 'review_add');
- $R->route('GET', '/login', 'login');
- $R->route('GET', '/signup', 'signup');
+ if(!$LOGGEDIN) {
+ $R->route('GET', '/', 'home');
+ $R->route('GET', '/login', 'login');
+ $R->route('GET', '/signup', 'signup');
+ }
- $R->route('POST', '/contact/send', 'contact');
+ if($LOGGEDIN) {
+ $R->route('GET', '/', 'beer_get');
+ $R->route('GET', '/beer/add', 'beer_add');
+ $R->route('GET', '/beer/get/{id}', 'beer_get');
+ $R->route('GET', '/review/add', 'review_add');
+
+ $R->route('POST', '/contact/send', 'contact');
+ }
if(!$LOGGEDIN && $R->getUrl() == '/') {
// show login page
}
- $R = null;
+ //$R = null;
?>
+
+
+
+
+
+
+
+
+