优化: 代码质量收尾(搜索索引补全+编译警告清理+i18n核验+String替newtype)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { taskApi } from '@/api'
|
||||
import type { TaskQuery } from '@/api/types'
|
||||
import type { TaskQuery, ProjectId } from '@/api/types'
|
||||
import { t } from '@/i18n/i18n-helpers'
|
||||
import { runWithCatch } from '@/composables/useStoreAction'
|
||||
import { state } from './state'
|
||||
@@ -22,7 +22,7 @@ export function createTasksStore() {
|
||||
})
|
||||
}
|
||||
|
||||
async function createTask(input: { project_id: string; title: string; description?: string; priority?: number; branch_name?: string; assignee?: string; idea_id?: string }) {
|
||||
async function createTask(input: { project_id: ProjectId; title: string; description?: string; priority?: number; branch_name?: string; assignee?: string; idea_id?: string }) {
|
||||
const record = await runWithCatch(state, t('tasks.err.createFailed'), async () => {
|
||||
const r = await taskApi.create(input)
|
||||
state.tasks.push(r)
|
||||
|
||||
Reference in New Issue
Block a user