AppController::markComplete($id); }); $routes->get('/tasks/incomplete/:id', 'check_logged_in', function ($id) { AppController::markInComplete($id); }); $routes->get('/tasks/edit/:id', 'check_logged_in', function ($id) { AppController::editTask($id); }); $routes->post('/tasks/edit/:id', 'check_logged_in', function ($id) { AppController::updateTask($id); }); $routes->get('/tasks/delete/:id', 'check_logged_in', function ($id) { AppController::deleteTask($id); }); $routes->get('/hiekkalaatikko', function () { AuthController::sandbox(); }); $routes->get('/categories/create', 'check_logged_in', function () { CategoriesController::createCategory(); }); $routes->post('/categories/create', 'check_logged_in', function () { CategoriesController::storeCategory(); }); $routes->get('/categories/delete/:id', 'check_logged_in', function ($id) { CategoriesController::deleteCategory($id); }); $routes->get('/tasks/category/:id', 'check_logged_in', function ($id) { AppController::categoryTasks($id); }); $routes->post('/tasks/search', 'check_logged_in', function () { AppController::search();