fix(KB-629): add Task type import and fix type error in batch update
This commit is contained in:
@@ -3,7 +3,7 @@ import multer from "multer";
|
||||
import { createReadStream, existsSync } from "node:fs";
|
||||
import { execSync } from "node:child_process";
|
||||
import type { TaskStore, Column, MergeResult, ScheduleType, ActivityEventType, ModelPreset, AutomationStep } from "@fusion/core";
|
||||
import { COLUMNS, VALID_TRANSITIONS, GLOBAL_SETTINGS_KEYS, type BatchStatusEntry, type BatchStatusResponse, type BatchStatusResult, type IssueInfo, type PrInfo, isGhAuthenticated, AUTOMATION_PRESETS, AutomationStore, validateBackupSchedule, validateBackupRetention, validateBackupDir, syncBackupAutomation, exportSettings, importSettings, validateImportData } from "@fusion/core";
|
||||
import { COLUMNS, VALID_TRANSITIONS, GLOBAL_SETTINGS_KEYS, type BatchStatusEntry, type BatchStatusResponse, type BatchStatusResult, type IssueInfo, type PrInfo, type Task, isGhAuthenticated, AUTOMATION_PRESETS, AutomationStore, validateBackupSchedule, validateBackupRetention, validateBackupDir, syncBackupAutomation, exportSettings, importSettings, validateImportData } from "@fusion/core";
|
||||
import type { ServerOptions } from "./server.js";
|
||||
import { GitHubClient, getCurrentGitHubRepo, parseBadgeUrl } from "./github.js";
|
||||
import { githubRateLimiter } from "./github-poll.js";
|
||||
@@ -1675,7 +1675,7 @@ export function createApiRoutes(store: TaskStore, options?: ServerOptions): Rout
|
||||
const errors: Array<{ taskId: string; error: string }> = [];
|
||||
|
||||
for (const result of results) {
|
||||
if (result.success && "task" in result) {
|
||||
if (result.success && "task" in result && result.task) {
|
||||
updated.push(result.task);
|
||||
} else if (!result.success) {
|
||||
errors.push({ taskId: result.taskId, error: result.error });
|
||||
|
||||
Reference in New Issue
Block a user