<?php

use CodeIgniter\Router\RouteCollection;

use App\Controllers\logInController;
use App\Controllers\Browse;
use App\Controllers\Create;


/**
 * @var RouteCollection $routes
 */
$routes->get('/', 'Home::index');


//----------------------login/register-block---------------------------------------
$routes->get('/login', [logInController::class, 'index']);
$routes->get('/logout', [logInController::class, 'logout']);
$routes->post('/login/verify', [logInController::class, 'login']);
$routes->get('/login/register', [logInController::class, 'registerIndex']);
$routes->post('/login/register/create', [logInController::class, 'registerUser']);


//----------------------browse-block------------------------------------------------
$routes->get('browse', [Browse::class, 'index']);

//----------------------create-block------------------------------------------------
$routes->get('create', [Create::class, 'index']);
