Skip to content

Commit 66edfa1

Browse files
committed
feat: read only minted contents from the CMS
1 parent 0ae6550 commit 66edfa1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/api/reports/update/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NextResponse } from "next/server";
33

44
export async function GET() {
55
try {
6+
console.log("api/reports/update has called");
67
await fetchNewReports();
78
await updateCMSContents();
89
return NextResponse.json({ status: 200 });

lib/directus.ts

+6
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ export const getCMSReports = async (): Promise<CMSContent[]> => {
168168
filter: {
169169
status: {
170170
_eq: 'published',
171+
},
172+
Minted: {
173+
_eq: true,
171174
}
172175
},
173176
})
@@ -198,6 +201,9 @@ export const updateCMSReports = async (): Promise<CMSContent[]> => {
198201
filter: {
199202
status: {
200203
_eq: 'published',
204+
},
205+
Minted: {
206+
_eq: true,
201207
}
202208
},
203209
})

0 commit comments

Comments
 (0)