54 lines
2.2 KiB
PHP
54 lines
2.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('ping', 'Api\PingController@index');
|
|
|
|
Route::get('assets/{uuid}', 'Api\Assets\RenderFileController@open');
|
|
Route::get('assets/{uuid}/render', 'Api\Assets\RenderFileController@show');
|
|
Route::get('assets/{uuid}/download', 'Api\Assets\RenderFileController@download');
|
|
|
|
Route::post('register', 'Api\Auth\RegisterController@store');
|
|
Route::post('passwords/reset', 'Api\Auth\PasswordsController@store');
|
|
Route::put('passwords/reset', 'Api\Auth\PasswordsController@update');
|
|
|
|
Route::get('/check-email', 'Api\Auth\RegisterController@checkEmail');
|
|
|
|
Route::get('pages', 'Api\Pages\PagesController@index');
|
|
Route::get('pages/root', 'Api\Pages\PagesController@root');
|
|
Route::get('pages/{id}', 'Api\Pages\PagesController@show');
|
|
|
|
Route::group(['middleware' => ['auth:api']], function() {
|
|
Route::apiResource('users', 'Api\Users\UsersController');
|
|
Route::apiResource('roles', 'Api\Users\RolesController');
|
|
|
|
Route::get('permissions', 'Api\Users\PermissionsController@index');
|
|
|
|
Route::group(['prefix' => 'me'], function() {
|
|
Route::get('/', 'Api\Users\ProfileController@index');
|
|
Route::put('/', 'Api\Users\ProfileController@update');
|
|
Route::patch('/', 'Api\Users\ProfileController@update');
|
|
Route::put('/password', 'Api\Users\ProfileController@updatePassword');
|
|
|
|
Route::group(['prefix' => 'notifications'], function() {
|
|
Route::get('/', 'Api\NotificationsController@list');
|
|
Route::get('/count', 'Api\NotificationsController@count');
|
|
});
|
|
});
|
|
|
|
Route::group(['prefix' => 'assets'], function() {
|
|
Route::post('/', 'Api\Assets\UploadFileController@store');
|
|
});
|
|
|
|
Route::apiResource('objects', 'Api\Objects\ObjectsController');
|
|
Route::apiResource('object-types', 'Api\Objects\ObjectTypesController');
|
|
|
|
Route::group(['prefix' => 'forms'], function() {
|
|
Route::get('/{target}/{type?}/{id?}', 'Api\Forms\FormsController@get');
|
|
Route::post('/{target}/{type?}/{id?}', 'Api\Forms\FormsController@save');
|
|
});
|
|
Route::get('filters/{type}', 'Api\Forms\FormsController@filters');
|
|
|
|
Route::get('dadata/{inn}', 'Api\Companies\CompaniesController@getDataByInn');
|
|
});
|