fix lost method and version upgrade

This commit is contained in:
korelstar 2017-06-28 06:50:03 +02:00
parent 151d99e386
commit d744b8eb03
2 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<description><![CDATA[
The Notes app is a distraction free notes taking app. It supports formatting using [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax. Notes are saved as files in your Nextcloud, so you can view and edit them with every Nextcloud client. Furthermore, a separate [RESTful API](https://github.com/nextcloud/notes/wiki/API-0.2) allows for an easy integration into third-party apps (currently, there are notes apps for [Android](https://github.com/stefan-niedermann/nextcloud-notes) and [iOS](https://github.com/owncloud/notes-iOS-App) which allow convenient access to your Nextcloud notes). Further features include marking notes as favorites and future versions will provide categories for better organization.
]]></description>
<version>2.2.0</version>
<version>2.2.1</version>
<licence>agpl</licence>
<author>Bernhard Posselt, Jan-Christoph Borchardt, Hendrik Leppelsack</author>
<namespace>Notes</namespace>

View File

@ -59,6 +59,12 @@ class MetaService {
return $result;
}
private function create($userId, $note) {
$meta = Meta::fromNote($note, $userId);
$this->metaMapper->insert($meta);
return $meta;
}
private function updateIfNeeded(&$meta, $note) {
if($note->getEtag()!==$meta->getEtag()) {
$meta->setEtag($note->getEtag());