Skip to content

Commit

Permalink
feat: read only minted contents from the CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
baumstern committed Nov 11, 2024
1 parent 0ae6550 commit 66edfa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/api/reports/update/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { NextResponse } from "next/server";

export async function GET() {
try {
console.log("api/reports/update has called");
await fetchNewReports();
await updateCMSContents();
return NextResponse.json({ status: 200 });
Expand Down
6 changes: 6 additions & 0 deletions lib/directus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export const getCMSReports = async (): Promise<CMSContent[]> => {
filter: {
status: {
_eq: 'published',
},
Minted: {
_eq: true,
}
},
})
Expand Down Expand Up @@ -198,6 +201,9 @@ export const updateCMSReports = async (): Promise<CMSContent[]> => {
filter: {
status: {
_eq: 'published',
},
Minted: {
_eq: true,
}
},
})
Expand Down

0 comments on commit 66edfa1

Please sign in to comment.