-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
31 lines (22 loc) · 939 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require 'Routing.php';
$path = trim($_SERVER['REQUEST_URI'], '/');
$path = parse_url($path, PHP_URL_PATH);
Router::get('', 'DefaultController');
Router::get('logout', 'SecurityController');
Router::post('login', 'SecurityController');
Router::post('signup', 'SecurityController');
Router::get('joinChallenge', 'ChallengeController');
Router::get('explore', 'ChallengeController');
Router::get('ongoingChallenges', 'ChallengeController');
Router::get('userCollection', 'EntryController');
Router::post('uploadEntry', 'EntryController');
Router::get('user', 'UserController');
Router::get('settings', 'UserController');
Router::post('changeUsername', 'UserController');
Router::post('changePassword', 'UserController');
Router::post('deleteUser', 'UserController');
Router::get('admin', 'AdminController');
Router::get('refreshChallenges', 'AdminController');
Router::post('deleteUser', 'AdminController');
Router::run($path);