mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
* fix: #181 * fix: use taskHandler as source of truth for imports * fix: task formatting * fix: zip downloads * feat: re-enable import version button on delete + lint
14 lines
298 B
TypeScript
14 lines
298 B
TypeScript
import type { TaskLog } from "~/server/internal/tasks";
|
|
|
|
export function parseTaskLog(
|
|
logStr?: string | undefined,
|
|
): typeof TaskLog.infer {
|
|
if (!logStr) return { message: "", timestamp: "" };
|
|
const log = JSON.parse(logStr);
|
|
|
|
return {
|
|
message: log.msg,
|
|
timestamp: log.time,
|
|
};
|
|
}
|