<?php

/*
|--------------------------------------------------------------------------
| Module Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for this module.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::group(['prefix' => Config::get('app.api_path'), 'middleware' => ['web', 'auth']], function () {
    Route::resource('notifications/settings/', 'App\Modules\Notifications\controllers\api\v1\NotificationSettingsControllerREST');
    Route::resource('notifications', 'App\Modules\Notifications\controllers\api\v1\NotificationsControllerREST');
    Route::post('notifications/read/{id}', 'App\Modules\Notifications\controllers\api\v1\NotificationsControllerREST@read');
});

Route::group(['middleware' => ['web', 'auth']], function () {
    Route::get('notifications', 'App\Modules\Notifications\NotificationsController@getIndex');
});

Route::group(['middleware' => 'oauth', 'prefix' => 'oauth'], function () {
    Route::resource('notifications/desktopnotificationssettings', 'App\Modules\Notifications\controllers\api\v1\DesktopNotificationsSettingsController');
});
