mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #28999 from lamrani002/fixApi_Shipment
Fix return method deleteLine (PHPStan warnings
This commit is contained in:
commit
5dbd99bf95
|
|
@ -386,7 +386,7 @@ class Shipments extends DolibarrApi
|
|||
*
|
||||
* @url DELETE {id}/lines/{lineid}
|
||||
*
|
||||
* @return int
|
||||
* @return array
|
||||
*
|
||||
* @throws RestException 401
|
||||
* @throws RestException 404
|
||||
|
|
@ -410,7 +410,12 @@ class Shipments extends DolibarrApi
|
|||
|
||||
$updateRes = $this->shipment->deleteLine(DolibarrApiAccess::$user, $lineid);
|
||||
if ($updateRes > 0) {
|
||||
return $this->get($id);
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'message' => 'line ' .$lineid. ' deleted'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
throw new RestException(405, $this->shipment->error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user