Added usage check to delete endpoints

This commit is contained in:
Constantin Graf
2024-04-18 21:42:29 +02:00
committed by Constantin Graf
parent 40f1159ea5
commit ad6146c483
18 changed files with 326 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
declare(strict_types=1);
use App\Exceptions\Api\EntityStillInUseApiException;
use App\Exceptions\Api\InactiveUserCanNotBeUsedApiException;
use App\Exceptions\Api\TimeEntryCanNotBeRestartedApiException;
use App\Exceptions\Api\TimeEntryStillRunningApiException;
@@ -15,5 +16,6 @@ return [
TimeEntryCanNotBeRestartedApiException::KEY => 'Time entry is already stopped and can not be restarted',
InactiveUserCanNotBeUsedApiException::KEY => 'Inactive user can not be used',
UserIsAlreadyMemberOfProjectApiException::KEY => 'User is already a member of the project',
EntityStillInUseApiException::KEY => 'The :modelToDelete is still used by a :modelInUse and can not be deleted.',
],
];