mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Fix unable to forget a shared note deleted by the owner. Issue #72
This commit is contained in:
@@ -54,12 +54,9 @@ class ShareController extends Controller {
|
||||
*
|
||||
* @param int $noteId
|
||||
*/
|
||||
public function destroy(int $noteId): JSONResponse {
|
||||
if ($this->noteShareMapper->forgetShareByNoteIdAndSharedUser($noteId, $this->userId)) {
|
||||
return new JSONResponse([], Http::STATUS_OK);
|
||||
} else {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
public function forget(int $noteId): JSONResponse {
|
||||
$this->noteShareMapper->forgetShareByNoteIdAndSharedUser($noteId, $this->userId);
|
||||
return new JSONResponse([]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user