Browse Source
Remove unused method
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/8515/head
Joas Schilling
3 years ago
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
2 changed files with
0 additions and
21 deletions
-
tests/integration/spreedcheats/appinfo/routes.php
-
tests/integration/spreedcheats/lib/Controller/ApiController.php
|
|
|
@ -26,6 +26,5 @@ declare(strict_types=1); |
|
|
|
return [ |
|
|
|
'ocs' => [ |
|
|
|
['name' => 'Api#resetSpreed', 'url' => '/', 'verb' => 'DELETE'], |
|
|
|
['name' => 'Api#getMessageExpirationJob', 'url' => '/get_message_expiration_job', 'verb' => 'GET'], |
|
|
|
], |
|
|
|
]; |
|
|
|
@ -103,24 +103,4 @@ class ApiController extends OCSController { |
|
|
|
|
|
|
|
return new DataResponse(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @NoCSRFRequired |
|
|
|
* |
|
|
|
* @return DataResponse |
|
|
|
*/ |
|
|
|
public function getMessageExpirationJob(): DataResponse { |
|
|
|
$query = $this->db->getQueryBuilder(); |
|
|
|
$query->select('id') |
|
|
|
->from('jobs') |
|
|
|
->where( |
|
|
|
$query->expr()->eq('class', $query->createNamedParameter(ExpireChatMessages::class)) |
|
|
|
); |
|
|
|
$result = $query->executeQuery(); |
|
|
|
$job = $result->fetchOne(); |
|
|
|
if ($job) { |
|
|
|
return new DataResponse(['id' => (int) $job]); |
|
|
|
} |
|
|
|
return new DataResponse([], Http::STATUS_NOT_FOUND); |
|
|
|
} |
|
|
|
} |