@@ -34,7 +34,7 @@ export class TogglGateway {
3434 ) ;
3535 }
3636
37- startTimeEntry ( task , description ) {
37+ startTimeEntry ( project , task , description ) {
3838 return this . #request(
3939 "post" ,
4040 `/workspaces/${ task . workspace_id } /time_entries` ,
@@ -43,10 +43,10 @@ export class TogglGateway {
4343 description,
4444 start : new Date ( ) . toISOString ( ) ,
4545 duration : - 1 ,
46- workspace_id : task . workspace_id ,
47- project_id : task . project_id ,
46+ workspace_id : project . workspace_id ,
47+ project_id : project . id ,
4848 task_id : task . id ,
49- billable : task . project_billable ,
49+ billable : project . billable ,
5050 created_with : "trektor" ,
5151 } ,
5252 } ,
@@ -89,7 +89,7 @@ export class TogglService {
8989 const project = await this . #getProject( workspace , tracking . project ) ;
9090 const task = await this . #getOrCreateTask( project , tracking . task ) ;
9191
92- await this . #gateway. startTimeEntry ( task , tracking . description ) ;
92+ await this . #gateway. startTimeEntry ( project , task , tracking . description ) ;
9393 }
9494
9595 async #getWorkspace( ) {
0 commit comments