aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller/OpenLocalEditorController.php
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-06-14 14:43:41 +0200
committerjld3103 <jld3103yt@gmail.com>2023-07-12 09:06:10 +0200
commit259264b966b3fde0cfcfb44e8047206c58917268 (patch)
tree056ac7957938aa04f4494beddb9a047c4af11484 /apps/files/lib/Controller/OpenLocalEditorController.php
parent46284f1696700c2553d8d2f5340ad3bcbad08470 (diff)
downloadnextcloud-server-259264b966b3fde0cfcfb44e8047206c58917268.tar.gz
nextcloud-server-259264b966b3fde0cfcfb44e8047206c58917268.zip
files: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/files/lib/Controller/OpenLocalEditorController.php')
-rw-r--r--apps/files/lib/Controller/OpenLocalEditorController.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/OpenLocalEditorController.php b/apps/files/lib/Controller/OpenLocalEditorController.php
index 7d784196361..d9fb80f2d2b 100644
--- a/apps/files/lib/Controller/OpenLocalEditorController.php
+++ b/apps/files/lib/Controller/OpenLocalEditorController.php
@@ -70,6 +70,14 @@ class OpenLocalEditorController extends OCSController {
/**
* @NoAdminRequired
* @UserRateThrottle(limit=10, period=120)
+ *
+ * Create a local editor
+ *
+ * @param string $path Path of the file
+ *
+ * @return DataResponse<Http::STATUS_OK, array{userId: ?string, pathHash: string, expirationTime: int, token: string}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array<empty>, array{}>
+ *
+ * 200: Local editor returned
*/
public function create(string $path): DataResponse {
$pathHash = sha1($path);
@@ -107,6 +115,16 @@ class OpenLocalEditorController extends OCSController {
/**
* @NoAdminRequired
* @BruteForceProtection(action=openLocalEditor)
+ *
+ * Validate a local editor
+ *
+ * @param string $path Path of the file
+ * @param string $token Token of the local editor
+ *
+ * @return DataResponse<Http::STATUS_OK, array{userId: string, pathHash: string, expirationTime: int, token: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ *
+ * 200: Local editor validated successfully
+ * 404: Local editor not found
*/
public function validate(string $path, string $token): DataResponse {
$pathHash = sha1($path);