mirror of
https://github.com/JanGross/quicknotes.git
synced 2026-12-01 02:17:00 +01:00
Fill update note response with real new tags to update sidebar menu
This commit is contained in:
1 parent
4940db0f8e
commit
14ccba7de2
1 file changed
+6
-3
@@ -203,9 +203,6 @@ class NoteController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// Purge orphan tags.
|
||||
$this->tagmapper->dropOld();
|
||||
|
||||
// Set new info on Note
|
||||
$note->setTitle($title);
|
||||
$note->setContent($content);
|
||||
@@ -217,6 +214,9 @@ class NoteController extends Controller {
|
||||
// Update note.
|
||||
$newnote = $this->notemapper->update($note);
|
||||
|
||||
// Fill new tags
|
||||
$newnote->setTags($this->tagmapper->getTagsForNote($this->userId, $newnote->getId()));
|
||||
|
||||
// Remove old color if necessary
|
||||
if (($oldcolorid !== $hcolor->getId()) &&
|
||||
(!$this->notemapper->colorIdCount($oldcolorid))) {
|
||||
@@ -224,6 +224,9 @@ class NoteController extends Controller {
|
||||
$this->colormapper->delete($oldcolor);
|
||||
}
|
||||
|
||||
// Purge orphan tags.
|
||||
$this->tagmapper->dropOld();
|
||||
|
||||
return new DataResponse($newnote);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user