Commit d3f2c470 authored by Dzulfqar Ridha's avatar Dzulfqar Ridha

penyesuaian untuk developing metering

parent d1656362
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Classes\MResponse; use App\Classes\MResponse;
use App\Http\Request\AppCreateRequest; use App\Http\Request\MSAppCreateRequest;
use App\Http\Request\AppUpdateRequest; use App\Http\Request\MSAppUpdateRequest;
use App\Http\Request\AppDeleteRequest; use App\Http\Request\MSAppDeleteRequest;
use App\Http\Request\AppGetByAppIdRequest; use App\Http\Request\MSAppGetByAppIdRequest;
use App\Http\Request\AppGetByUserIdRequest; use App\Http\Request\MSAppGetByUserIdRequest;
class ApplicationController extends BaseController class ApplicationController extends BaseController
{ {
public function create(AppCreateRequest $request) public function create(MSAppCreateRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -50,7 +50,7 @@ class ApplicationController extends BaseController ...@@ -50,7 +50,7 @@ class ApplicationController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function update(AppUpdateRequest $request) public function update(MSAppUpdateRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -83,7 +83,7 @@ class ApplicationController extends BaseController ...@@ -83,7 +83,7 @@ class ApplicationController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function delete(AppDeleteRequest $request) public function delete(MSAppDeleteRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -111,7 +111,7 @@ class ApplicationController extends BaseController ...@@ -111,7 +111,7 @@ class ApplicationController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function getByUserID(AppGetByUserIdRequest $request) public function getByUserID(MSAppGetByUserIdRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -139,7 +139,7 @@ class ApplicationController extends BaseController ...@@ -139,7 +139,7 @@ class ApplicationController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function getByAppId(AppGetByAppIdRequest $request) public function getByAppId(MSAppGetByAppIdRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
......
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Classes\MResponse; use App\Classes\MResponse;
use App\Http\Request\PackageKeyCreateRequest; use App\Http\Request\MSPackageKeyCreateRequest;
use App\Http\Request\PackageKeyActivateRequest; use App\Http\Request\MSPackageKeyActivateRequest;
use App\Http\Request\PackageKeyDisableRequest; use App\Http\Request\MSPackageKeyDisableRequest;
use App\Http\Request\PackageKeyDeleteRequest; use App\Http\Request\MSPackageKeyDeleteRequest;
use App\Http\Request\PackageKeyGetByUserRequest; use App\Http\Request\MSPackageKeyGetByUserRequest;
use App\Http\Request\PackageKeyUpdatePlanRequest; use App\Http\Request\MSPackageKeyUpdatePlanRequest;
class PackageKeyController extends BaseController class PackageKeyController extends BaseController
{ {
public function create(PackageKeyCreateRequest $request) public function create(MSPackageKeyCreateRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -57,7 +57,7 @@ class PackageKeyController extends BaseController ...@@ -57,7 +57,7 @@ class PackageKeyController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function activate(PackageKeyActivateRequest $request) public function activate(MSPackageKeyActivateRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -89,7 +89,7 @@ class PackageKeyController extends BaseController ...@@ -89,7 +89,7 @@ class PackageKeyController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function disable(PackageKeyDisableRequest $request) public function disable(MSPackageKeyDisableRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -121,7 +121,7 @@ class PackageKeyController extends BaseController ...@@ -121,7 +121,7 @@ class PackageKeyController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function delete(PackageKeyDeleteRequest $request) public function delete(MSPackageKeyDeleteRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -129,7 +129,7 @@ class PackageKeyController extends BaseController ...@@ -129,7 +129,7 @@ class PackageKeyController extends BaseController
$url = 'https://api.mashery.com/v3/rest/applications/' . $request->get('appId') .'/packageKeys/' . $request->get('pkgKeyId'); $url = 'https://api.mashery.com/v3/rest/applications/' . $request->get('appId') .'/packageKeys/' . $request->get('pkgKeyId');
try { try {
$response = $this->masheryClient()->request('DEL', $url); $response = $this->masheryClient()->request('DELETE', $url);
$resBody = json_decode($response->getBody()->getContents(), true); $resBody = json_decode($response->getBody()->getContents(), true);
...@@ -149,7 +149,7 @@ class PackageKeyController extends BaseController ...@@ -149,7 +149,7 @@ class PackageKeyController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function getByUser(PackageKeyGetByUserRequest $request) public function getByUser(MSPackageKeyGetByUserRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
...@@ -181,7 +181,7 @@ class PackageKeyController extends BaseController ...@@ -181,7 +181,7 @@ class PackageKeyController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function updatePlan(PackageKeyUpdatePlanRequest $request) public function updatePlan(MSPackageKeyUpdatePlanRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Classes\MResponse; use App\Classes\MResponse;
use App\Http\Request\PackagePlanPlanRequest; use App\Http\Request\MSPackagePlanPlanRequest;
class PackagePlanController extends BaseController class PackagePlanController extends BaseController
{ {
...@@ -73,7 +73,7 @@ class PackagePlanController extends BaseController ...@@ -73,7 +73,7 @@ class PackagePlanController extends BaseController
return response()->json($mResponse, $statusCode); return response()->json($mResponse, $statusCode);
} }
public function getPlan(PackagePlanPlanRequest $request) public function getPlan(MSPackagePlanPlanRequest $request)
{ {
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
......
...@@ -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\UserCreateRequest; use App\Http\Request\MSUserCreateRequest;
use App\Http\Request\UserGetByUsernameRequest; use App\Http\Request\MSUserGetByUsernameRequest;
use App\Http\Request\UserGetByIdRequest; use App\Http\Request\MSUserGetByIdRequest;
use App\Http\Request\UserUpdateRequest; use App\Http\Request\MSUserUpdateRequest;
class UserController extends BaseController class UserController extends BaseController
{ {
public function getByUsername(UserGetByUsernameRequest $request) public function getByUsername(MSUserGetByUsernameRequest $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(UserGetByIdRequest $request){ public function getById(MSUserGetByIdRequest $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(UserCreateRequest $request) public function createUser(MSUserCreateRequest $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(UserUpdateRequest $request){ public function updateUser(MSUserUpdateRequest $request){
$mResponse = new MResponse(); $mResponse = new MResponse();
$statusCode = 200; $statusCode = 200;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace App\Http\Request; namespace App\Http\Request;
class AppCreateRequest extends FormRequestErrors class MSAppCreateRequest 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 AppDeleteRequest extends FormRequestErrors class MSAppDeleteRequest 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 AppGetByAppIdRequest extends FormRequestErrors class MSAppGetByAppIdRequest 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 AppGetByUserIdRequest extends FormRequestErrors class MSAppGetByUserIdRequest 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 AppUpdateRequest extends FormRequestErrors class MSAppUpdateRequest 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 PackageKeyDisableRequest extends FormRequestErrors class MSPackageKeyActivateRequest 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 PackageKeyCreateRequest extends FormRequestErrors class MSPackageKeyCreateRequest 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 PackageKeyDeleteRequest extends FormRequestErrors class MSPackageKeyDeleteRequest 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 PackageKeyActivateRequest extends FormRequestErrors class MSPackageKeyDisableRequest 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 PackageKeyGetByUserRequest extends FormRequestErrors class MSPackageKeyGetByUserRequest 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 PackageKeyUpdatePlanRequest extends FormRequestErrors class MSPackageKeyUpdatePlanRequest 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 PackagePlanPlanRequest extends FormRequestErrors class MSPackagePlanPlanRequest 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 UserCreateRequest extends FormRequestErrors class MSUserCreateRequest 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 UserGetByIdRequest extends FormRequestErrors class MSUserGetByIdRequest 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 UserGetByUsernameRequest extends FormRequestErrors class MSUserGetByUsernameRequest 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 UserUpdateRequest extends FormRequestErrors class MSUserUpdateRequest extends FormRequestErrors
{ {
protected function validationData() protected function validationData()
{ {
......
...@@ -47,7 +47,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) { ...@@ -47,7 +47,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) {
$router->put('activate', 'PackageKeyController@activate'); $router->put('activate', 'PackageKeyController@activate');
$router->put('disable', 'PackageKeyController@disable'); $router->put('disable', 'PackageKeyController@disable');
$router->delete('delete', 'PackageKeyController@delete'); $router->delete('delete', 'PackageKeyController@delete');
$router->get('by-username', 'PackageKeyController@getByUser'); $router->get('get', '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