mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
inspector delete application (#4521)
This commit is contained in:
@@ -17,6 +17,7 @@ use Alchemy\Phrasea\Core\Event\Record\Structure\StatusBitUpdatedEvent;
|
||||
use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository;
|
||||
use Alchemy\Phrasea\Exception\SessionNotFound;
|
||||
use Alchemy\Phrasea\Model\Entities\ApiApplication;
|
||||
use Alchemy\Phrasea\Model\Manipulator\ApiApplicationManipulator;
|
||||
use Alchemy\Phrasea\Model\Manipulator\ApiOauthTokenManipulator;
|
||||
use Alchemy\Phrasea\Model\Repositories\ApiAccountRepository;
|
||||
use Alchemy\Phrasea\Model\Repositories\ApiOauthTokenRepository;
|
||||
@@ -507,6 +508,13 @@ class RootController extends Controller
|
||||
return $this->app->json(['success' => true]);
|
||||
}
|
||||
|
||||
public function deleteApplication(Request $request, ApiApplication $application)
|
||||
{
|
||||
$this->getApiApplicationManipulator()->delete($application);
|
||||
|
||||
return $this->app->json(['success' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApiOauthTokenRepository
|
||||
*/
|
||||
@@ -582,4 +590,12 @@ class RootController extends Controller
|
||||
'off_databoxes' => $off_databoxes,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApiApplicationManipulator
|
||||
*/
|
||||
private function getApiApplicationManipulator()
|
||||
{
|
||||
return $this->app['manipulator.api-application'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user