MessageController::createMessage($id); }); $routes->get('/message/:id/edit', function ($id) { BaseController::check_message_rights($id); MessageController::editMessage($id); }); $routes->post('/thread/:thread_id/message', 'check_logged_in', function ($thread_id) { MessageController::addMessage($thread_id); }); $routes->post('/message/:id/update', function ($id) { BaseController::check_message_rights($id); MessageController::updateMessage($id); }); $routes->post('/message/:id/destroy', function ($id) { BaseController::check_message_rights($id); MessageController::destroyMessage($id); }); //Login $routes->get('/login', function () { LoginController::login(); }); $routes->post('/login', function () { LoginController::handleLogin(); }); $routes->post('/logout', function () { LoginController::logout(); }); $routes->get('/register', function () { LoginController::register(); }); $routes->post('/register', function () {