-
Notifications
You must be signed in to change notification settings - Fork 9
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
Move to OCS API #53
Conversation
lib/Controller/LockController.php
Outdated
@@ -47,7 +46,7 @@ | |||
* | |||
* @package OCA\FilesLock\Controller | |||
*/ | |||
class LockController extends Controller { | |||
class LockController extends \OCP\AppFramework\OCSController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe import OCSController
lib/Controller/LockController.php
Outdated
@@ -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); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
Code looks good, will test (the OCS part) later |
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>
81c0b3f
to
c211bbe
Compare
Comments addressed |
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.