Skip to content

Commit 1b53c72

Browse files
committed
fixed problem updating workitem name and details
1 parent b737b3a commit 1b53c72

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

js/timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
var baseUrl = OC.generateUrl('/apps/timetracker/ajax/work-intervals');
184184
$.ajaxSetup({
185185
scriptCharset: "utf-8",
186-
contentType: "application/json; charset=utf-8"
186+
//contentType: "application/json; charset=utf-8"
187187
});
188188
$.getJSON( baseUrl, function( data ) {
189189

lib/Controller/AjaxController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,9 @@ public function updateWorkInterval($id) {
299299
$de->setTimeZone(new \DateTimeZone('UTC'));
300300
$wi->setDuration($de->getTimestamp() - $dt->getTimestamp());
301301
}
302-
302+
303303
$this->workIntervalMapper->update($wi);
304+
$running = $this->workIntervalMapper->findAllRunning($this->userId);
304305

305306
return new JSONResponse(["WorkIntervals" => json_decode(json_encode($running), true)]);
306307
}

0 commit comments

Comments
 (0)