diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2023-07-12 10:50:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 10:50:59 +0200 |
commit | 706c141fffce928d344fe2f039da549fad065393 (patch) | |
tree | 8c9901da6df6bfd1754dfed7a7f680c2e4448719 /apps/files/lib/Controller/OpenLocalEditorController.php | |
parent | 329d14264f44a3c4df16b65083c54f2986245e52 (diff) | |
parent | 259264b966b3fde0cfcfb44e8047206c58917268 (diff) | |
download | nextcloud-server-706c141fffce928d344fe2f039da549fad065393.tar.gz nextcloud-server-706c141fffce928d344fe2f039da549fad065393.zip |
Merge pull request #39327 from nextcloud/feature/openapi/files
files: Add OpenAPI spec
Diffstat (limited to 'apps/files/lib/Controller/OpenLocalEditorController.php')
-rw-r--r-- | apps/files/lib/Controller/OpenLocalEditorController.php | 18 |
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); |