Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
radityaharya committed Apr 22, 2024
1 parent 663ceb3 commit 7d932fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/app/api/user/[uid]/workflows/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { getServerSession } from "next-auth";
import { authOptions } from "@/server/auth";
import { db } from "@/server/db";
import { Logger } from "@/lib/log";
import { type API } from "~/types/workflows";

const log = new Logger("/api/workflow/[id]");

Expand Down Expand Up @@ -36,7 +35,7 @@ export async function GET(
createdAt: createdAt?.getTime(),
lastRunAt: workflowRuns[0]?.startedAt?.getTime(),
}),
) as API.WorkflowsResponse;
) as WorkflowResponse[];

log.info(`Returning workflows for user ${session.user.id}`);
return NextResponse.json(res);
Expand Down
2 changes: 1 addition & 1 deletion src/app/workflows/WorkflowTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const columns: ColumnDef<WorkflowsTableColumn>[] = [
accessorKey: "createdAt",
cell: ({ row, getValue }) => {
const createdAt = getValue() as WorkflowResponse["createdAt"];
return relativeDate(createdAt);
return relativeDate(createdAt!);
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ interface WorkflowResponse {
name: string;
workflow: WorkflowObject;
cron?: string;
createdAt: number;
createdAt?: number;
lastRunAt?: number;
modifiedAt?: number;
}
Expand Down

0 comments on commit 7d932fb

Please sign in to comment.