forked from nathalie/pedi2
Reestablecida ruta para devoluciones
This commit is contained in:
parent
2a1394a5c4
commit
2587c759fb
1 changed files with 5 additions and 0 deletions
|
@ -31,6 +31,11 @@ Route::middleware('api')->group(function () {
|
||||||
|
|
||||||
Route::get('/{grupoDeCompra}', 'Api\GrupoDeCompraController@show');
|
Route::get('/{grupoDeCompra}', 'Api\GrupoDeCompraController@show');
|
||||||
|
|
||||||
|
Route::get('/{gdc}/devoluciones', function($gdc) {
|
||||||
|
$habilitadas = GrupoDeCompra::find($gdc)->devoluciones_habilitadas;
|
||||||
|
return ['devoluciones' => $habilitadas];
|
||||||
|
});
|
||||||
|
|
||||||
Route::post('/{gdc}/devoluciones', function($gdc) {
|
Route::post('/{gdc}/devoluciones', function($gdc) {
|
||||||
$habilitadas = GrupoDeCompra::find($gdc)->toggleDevoluciones();
|
$habilitadas = GrupoDeCompra::find($gdc)->toggleDevoluciones();
|
||||||
return ['devoluciones' => $habilitadas];
|
return ['devoluciones' => $habilitadas];
|
||||||
|
|
Loading…
Add table
Reference in a new issue