33 行
1.3 KiB
PHP
33 行
1.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| User class
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These are the API routes corresponding to user.
|
|
|
|
|
*/
|
|
|
|
// Auth
|
|
Route::post('/api/rpc/user/auth/isauth', 'UserController@isAuth');
|
|
Route::post('/api/rpc/user/auth/login', 'UserController@login');
|
|
Route::post('/api/rpc/user/auth/register', 'UserController@register');
|
|
Route::post('/api/rpc/user/auth/logout', 'UserController@logout');
|
|
Route::group(['middleware' => 'jwt'], function () {
|
|
// Protected routes
|
|
Route::resource('getUserPosts', 'BoardController');
|
|
});
|
|
|
|
// Owner
|
|
Route::get('/api/rpc/user/owner/countownersofentry/{id}', 'UserController@countOwnersOfEntry');
|
|
Route::get('/api/rpc/user/owner/getownersofentry/{id}', 'UserController@getOwnersOfEntry');
|
|
Route::get('/api/rpc/user/owner/countentriesofowner/{id}', 'UserController@countEntriesOfOwner');
|
|
Route::get('/api/rpc/user/owner/getentriesofowner/{id}', 'UserController@getEntriesOfOwner');
|
|
|
|
// User
|
|
Route::get('/api/rpc/user/user/getusers', 'UserController@getUsers');
|
|
Route::get('/api/rpc/user/user/getuser/{id}', 'UserController@getUser');
|
|
Route::get('/api/rpc/user/user/getpoststyle/{id}', 'UserController@getPostStyle');
|
|
Route::get('/api/rpc/user/user/getgroupcolours', 'UserController@getGroupColours');
|