Browse Source

Task #860q2vhvg add sync HR

pull/3/head
Wahyu Ramadhan 2 years ago
parent
commit
2727c52a42
  1. 5
      app/Http/Controllers/HumanResourceController.php
  2. 1
      routes/web.php

5
app/Http/Controllers/HumanResourceController.php

@ -6,6 +6,7 @@ use Illuminate\Http\Request;
use App\Models\HumanResource;
use App\Models\UserToActivity;
use App\Models\UserToProyek;
use Illuminate\Support\Facades\Artisan;
class HumanResourceController extends Controller
{
@ -170,4 +171,8 @@ class HumanResourceController extends Controller
return response()->json(['status'=>'failed','message'=>'old_password is required!','code'=>400], 400);
}
}
public function sync(){
Artisan::call('sync:integration-human-resources');
}
}

1
routes/web.php

@ -108,6 +108,7 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout
$router->get('/human-resource/list', 'HumanResourceController@list');
$router->get('/human-resource/select', 'HumanResourceController@select');
$router->post('/human-resource/check-old-password/{id}', 'HumanResourceController@checkOldPassword');
$router->get('/human-resource/sync', 'HumanResourceController@sync');
$router->post('/project-role/search', 'ProjectRoleController@search');
$router->post('/project-role/add', 'ProjectRoleController@add');

Loading…
Cancel
Save