Skip to content

Commit

Permalink
feat: add time entry command will use default project if none provided (
Browse files Browse the repository at this point in the history
#204)

if no `-p` is provided wiht the command, it will add the time entry using the default project
  • Loading branch information
beauraines authored Nov 25, 2024
1 parent 9102a83 commit 82b32d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmds/addTimeEntry.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-unused-expressions */
import Client from '../client.js'
import { defaultWorkspaceId, getProjectByName, getProjectById, appName, displayTimeEntry, parseTime } from '../utils.js'
import { defaultProjectId, defaultWorkspaceId, getProjectByName, getProjectById, appName, displayTimeEntry, parseTime } from '../utils.js'
import dayjs from 'dayjs'
import debugClient from 'debug'
import utc from 'dayjs/plugin/utc.js'
Expand Down Expand Up @@ -32,6 +32,8 @@ export const handler = async function (argv) {
} else {
project = await getProjectById(params.workspace_id, argv.projectId)
}
} else {
project = await getProjectById(params.workspace_id, defaultProjectId )
}

let startTime, endTime
Expand Down

0 comments on commit 82b32d4

Please sign in to comment.