Skip to content

Commit

Permalink
Merge pull request #41 from uasoft-indonesia/develop
Browse files Browse the repository at this point in the history
Merge develop to main
  • Loading branch information
rizkiheryandi authored Jun 6, 2021
2 parents 904f1e5 + 2b38eb7 commit a769aa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'middleware' => [ApiRequest::class],
],
function () {
Route::group(['prefix' => 'v1/module'], function () {
Route::group(['prefix' => 'module/content/v1'], function () {
Route::group(['prefix' => 'content'], function () {
Route::get('/', 'ContentController@browse')->middleware(BadasoCheckPermissions::class.':browse_content');
Route::get('/read', 'ContentController@read')->middleware(BadasoCheckPermissions::class.':read_content');
Expand Down
14 changes: 7 additions & 7 deletions src/resources/js/api/modules/badaso-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ let apiPrefix = process.env.MIX_API_ROUTE_PREFIX

export default {
browse(data = {}) {
let ep = apiPrefix + "/v1/module/content";
let ep = apiPrefix + "/module/content/v1/content";
let qs = QueryString(data);
let url = ep + qs;
return resource.get(url);
},

read(data) {
let ep = apiPrefix + "/v1/module/content/read";
let ep = apiPrefix + "/module/content/v1/content/read";
let qs = QueryString(data);
let url = ep + qs;
return resource.get(url);
},

fill(data) {
return resource.put(apiPrefix + "/v1/module/content/fill", data);
return resource.put(apiPrefix + "/module/content/v1/content/fill", data);
},

edit(data) {
return resource.put(apiPrefix + "/v1/module/content/edit", data);
return resource.put(apiPrefix + "/module/content/v1/content/edit", data);
},

add(data) {
return resource.post(apiPrefix + "/v1/module/content/add", data);
return resource.post(apiPrefix + "/module/content/v1/content/add", data);
},

delete(data) {
let paramData = {
data: data,
};
return resource.delete(apiPrefix + "/v1/module/content/delete", paramData);
return resource.delete(apiPrefix + "/module/content/v1/content/delete", paramData);
},

deleteMultiple(data) {
let paramData = {
data: data,
};
return resource.delete(
apiPrefix + "/v1/module/content/delete-multiple",
apiPrefix + "/module/content/v1/content/delete-multiple",
paramData
);
},
Expand Down

0 comments on commit a769aa0

Please sign in to comment.