Skip to content

Commit 55d12ff

Browse files
committed
fix: api route convention error
1 parent a4ac0d3 commit 55d12ff

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/app/log-event/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { NextApiRequest, NextApiResponse } from "next";
22
import { logTime } from "../gql/utils/log-time";
33

4-
export default async function handler(
4+
export const dynamic = "force-dynamic";
5+
6+
export default async function GET(
57
request: NextApiRequest,
68
response: NextApiResponse
79
) {

src/app/log-home-arrive/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import moment from "moment";
33
import { createDbClient } from "../gql/lib/db";
44
import { DAY_FORMAT } from "../gql/constants";
55

6-
export default async function handler(
6+
export const dynamic = "force-dynamic";
7+
8+
export default async function GET(
79
request: NextApiRequest,
810
response: NextApiResponse
911
) {

src/app/log-home-leave/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { NextApiRequest, NextApiResponse } from "next";
22
import { logTime } from "../gql/utils/log-time";
33

4-
export default async function handler(
4+
export const dynamic = "force-dynamic";
5+
6+
export default async function GET(
57
request: NextApiRequest,
68
response: NextApiResponse
79
) {

src/app/log-work-arrive/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { NextApiRequest, NextApiResponse } from "next";
22
import { logTime } from "../gql/utils/log-time";
33

4-
export default async function handler(
4+
export const dynamic = "force-dynamic";
5+
6+
export default async function GET(
57
request: NextApiRequest,
68
response: NextApiResponse
79
) {

0 commit comments

Comments
 (0)