11 lines
235 B
TypeScript
11 lines
235 B
TypeScript
|
|
import type { TaskLog } from "~/server/internal/tasks";
|
||
|
|
|
||
|
|
export function parseTaskLog(logStr: string): typeof TaskLog.infer {
|
||
|
|
const log = JSON.parse(logStr);
|
||
|
|
|
||
|
|
return {
|
||
|
|
message: log.message,
|
||
|
|
timestamp: log.timestamp,
|
||
|
|
};
|
||
|
|
}
|