user invitations fix

This commit is contained in:
hazim
2019-03-20 18:33:34 +08:00
parent 9ccc9617a2
commit 2b8e3ba455
3 changed files with 7 additions and 5 deletions
@@ -46,7 +46,7 @@
//turn on loading animation
this.isLoading = true;
var url = route('api.account.invite'),
var url = route('api.account.invite.create'),
method = 'post';
fetch(url, {
@@ -31,7 +31,7 @@
//turn on loading animation
this.isLoading = true;
fetch(route('api.account.list.invite') + '?page='+ page).then(response => response.json())
fetch(route('api.account.invite.list') + '?page='+ page).then(response => response.json())
.then(response => {
this.accounts = response.data;
+5 -3
View File
@@ -18,9 +18,11 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
// Account Routes
Route::group(['prefix' => 'account', 'as' => 'account.', 'namespace' => 'Account'], function () {
Route::post('/create', 'RegisterAccountController@register')->name('create');
Route::post('/invite', 'InviteUserController@invite')->name('invite');
Route::post('/test', 'CreateUserController@execute')->name('test');
Route::get('/list/active', 'ListUserController@list')->name('list');
Route::group(['prefix' => 'invite', 'as' => 'invite.'], function () {
Route::post('/invite', 'InviteUserController@invite')->name('create');
Route::get('/list/active', 'ListUserController@list')->name('list');
});
});
// Companies Routes