<?php

$routes->get('/', function () {
    HomeController::index();
});
// Auth
$routes->get('/login', 'guest', function () {
    AuthController::login();
});
$routes->post('/login', 'guest', function () {
    AuthController::handle_login();
});
$routes->get('/logout', 'auth', function () {
    AuthController::logout();
});
// Profile
$routes->get('/profile/edit', 'auth', function () {
    ProfileController::edit();
});
$routes->post('/profile/update', 'auth', function () {
    ProfileController::edit();
});
$routes->get('/profile/password', 'auth', function () {
    ProfileController::password();
});
$routes->post('/profile/password/update', 'auth', function () {
    ProfileController::updatePassword();
});
// Controlpanel
$routes->get('/controlpanel', 'admin', function () {
    AuthController::controlpanel();