Commit 1d9c6dfa authored by Dzulfqar Ridha's avatar Dzulfqar Ridha

minor update

parent 8c8baa05
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Classes\MResponse; use App\Classes\MResponse;
use App\Http\Request\User\UserByUsernameRequest; use App\Htpp\Request\User\CreateRequest;
use App\Http\Request\User\CreateUserRequest; use App\Http\Request\User\GetByUsernameRequest;
use App\Http\Request\User\UserByIdRequest; use App\Http\Request\User\GetByIdRequest;
use App\Http\Request\User\UpdateUserRequest; use App\Http\Request\User\UpdateRequest;
class UserController extends BaseController class UserController extends BaseController
{ {
public function getByUsername(UserByUsernameRequest $request) public function getByUsername(GetByUsernameRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -46,7 +46,7 @@ class UserController extends BaseController ...@@ -46,7 +46,7 @@ class UserController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function getById(UserByIdRequest $request){ public function getById(GetByIdRequest $request){
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -73,7 +73,7 @@ class UserController extends BaseController ...@@ -73,7 +73,7 @@ class UserController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function createUser(CreateUserRequest $request) public function createUser(CreateRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -108,7 +108,7 @@ class UserController extends BaseController ...@@ -108,7 +108,7 @@ class UserController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function updateUser(UpdateUserRequest $request){ public function updateUser(UpdateRequest $request){
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
namespace App\Http\Request; namespace App\Http\Request;
class CreateUserRequest extends FormRequestErrors use App\Htpp\Request\FormRequestErrors;
class CreateRequest extends FormRequestErrors
{ {
protected function validationData() protected function validationData()
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace App\Http\Request; namespace App\Http\Request;
class UserByIdRequest extends FormRequestErrors class GetByIdRequest extends FormRequestErrors
{ {
protected function validationData() protected function validationData()
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace App\Http\Request; namespace App\Http\Request;
class UserByUsernameRequest extends FormRequestErrors class GetByUsernameRequest extends FormRequestErrors
{ {
protected function validationData() protected function validationData()
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace App\Http\Request; namespace App\Http\Request;
class UpdateUserRequest extends FormRequestErrors class UpdateRequest extends FormRequestErrors
{ {
protected function validationData() protected function validationData()
{ {
......
...@@ -17,7 +17,7 @@ $router->get('/', function () use ($router) { ...@@ -17,7 +17,7 @@ $router->get('/', function () use ($router) {
$router->group(['prefix' => 'mashery'], function () use ($router) { $router->group(['prefix' => 'mashery'], function () use ($router) {
//mashery/token //mashery/token
$router->get('token', 'MasheryController@getToken'); $router->post('token', 'MasheryController@getToken');
}); });
$router->group(['middleware' => 'client.auth'], function () use ($router) { $router->group(['middleware' => 'client.auth'], function () use ($router) {
...@@ -31,7 +31,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) { ...@@ -31,7 +31,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) {
$router->group(['prefix' => 'application'], function () use ($router) { $router->group(['prefix' => 'application'], function () use ($router) {
$router->post('create', 'ApplicationController@create'); $router->post('create', 'ApplicationController@create');
$router->put('update', 'ApplicationController@update'); $router->put('update', 'ApplicationController@update');
$router->del('delete', 'ApplicationController@delete'); $router->delete('delete', 'ApplicationController@delete');
$router->get('by-userid', 'ApplicationController@getByUserId'); $router->get('by-userid', 'ApplicationController@getByUserId');
$router->get('by-appid', 'ApplicationController@getByAppId'); $router->get('by-appid', 'ApplicationController@getByAppId');
}); });
...@@ -46,7 +46,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) { ...@@ -46,7 +46,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) {
$router->post('create', 'PackageKeyController@create'); $router->post('create', 'PackageKeyController@create');
$router->put('activate', 'PackageKeyController@activate'); $router->put('activate', 'PackageKeyController@activate');
$router->put('disable', 'PackageKeyController@disable'); $router->put('disable', 'PackageKeyController@disable');
$router->del('delete', 'PackageKeyController@delete'); $router->delete('delete', 'PackageKeyController@delete');
$router->get('by-username', 'PackageKeyController@getByUser'); $router->get('by-username', 'PackageKeyController@getByUser');
$router->put('update-plan', 'PackageKeyController@updatePlan'); $router->put('update-plan', 'PackageKeyController@updatePlan');
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment