fixed addTime in task view

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-08-28 22:56:25 +02:00
parent 211bc917a3
commit b8428a2352

View File

@@ -5,6 +5,7 @@
import { api } from '../../urls.svelte.js';
import { t } from '../../translations.svelte.js';
import { timetrack } from '../../user.svelte.js';
import { now } from '../../time.svelte';
import LineEditor from '../../Components/LineEditor.svelte';
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
@@ -36,8 +37,12 @@
}
async function addTime(){
const url = api(`time/track_task/${id}`);
const resp = await fetch(url,{credentials:'include'}); // create new time or return time with assigned tasks
const url = api(`time/track_task/${task.id}`);
const resp = await fetch(url,{
credentials : 'include',
method : 'POST',
body : now()
}); // create new time or return time with assigned tasks
if (resp.ok) {
const track = await resp.json();
timetrack.running = track;