aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/WipeController.php
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-01-10 12:35:44 +0100
committerprovokateurin <kate@provokateurin.de>2024-02-21 12:07:50 +0100
commit2c51933b6bc5e8f2633114e9acc493fb72a314d7 (patch)
tree43100b132f7e9cd4e899edf0584884c7fa9f0cbc /core/Controller/WipeController.php
parent0117cd26940f2b0dcfd92ccf663bcf8853437193 (diff)
downloadnextcloud-server-2c51933b6bc5e8f2633114e9acc493fb72a314d7.tar.gz
nextcloud-server-2c51933b6bc5e8f2633114e9acc493fb72a314d7.zip
refactor(core): Switch to attribute based routing
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'core/Controller/WipeController.php')
-rw-r--r--core/Controller/WipeController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/Controller/WipeController.php b/core/Controller/WipeController.php
index c18b74e4b96..3e486003668 100644
--- a/core/Controller/WipeController.php
+++ b/core/Controller/WipeController.php
@@ -29,6 +29,7 @@ namespace OC\Core\Controller;
use OC\Authentication\Token\RemoteWipe;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\JSONResponse;
use OCP\Authentication\Exceptions\InvalidTokenException;
use OCP\IRequest;
@@ -58,6 +59,7 @@ class WipeController extends Controller {
* 200: Device should be wiped
* 404: Device should not be wiped
*/
+ #[FrontpageRoute(verb: 'POST', url: '/core/wipe/check')]
public function checkWipe(string $token): JSONResponse {
try {
if ($this->remoteWipe->start($token)) {
@@ -89,6 +91,7 @@ class WipeController extends Controller {
* 200: Wipe finished successfully
* 404: Device should not be wiped
*/
+ #[FrontpageRoute(verb: 'POST', url: '/core/wipe/success')]
public function wipeDone(string $token): JSONResponse {
try {
if ($this->remoteWipe->finish($token)) {