Skip to content

Move to OCS API #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 14, 2022
Merged

Move to OCS API #53

merged 3 commits into from
Mar 14, 2022

Conversation

juliusknorr
Copy link
Member

This will make sure that the API can be used properly by clients.

Fixes #48 though the final API to be implemented in clients should also include further API adjustments for #51, so this might change during further development effort.

@juliusknorr juliusknorr added the enhancement New feature or request label Feb 8, 2022
@juliusknorr juliusknorr mentioned this pull request Feb 8, 2022
11 tasks
@@ -47,7 +46,7 @@
*
* @package OCA\FilesLock\Controller
*/
class LockController extends Controller {
class LockController extends \OCP\AppFramework\OCSController {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe import OCSController

@@ -94,7 +93,7 @@ public function locking(string $fileId): DataResponse {
$user = $this->userSession->getUser();
$file = $this->fileService->getFileFromId($user->getUID(), (int)$fileId);

$lock = $this->lockService->lockFile($file, $user);
$lock = $this->lockService->lockFileAsUser($file, $user);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't test does lockFileAsUser() exist in LockService ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, good catch, seems I failed to commit only the relevant parts here, this is from #54

@ArtificialOwl
Copy link
Member

Code looks good, will test (the OCS part) later

@ArtificialOwl
Copy link
Member

can you remove it so we can work on merging this one ?

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
Copy link
Member Author

Comments addressed

@juliusknorr juliusknorr added this to the 24 milestone Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document API
2 participants