Skip to content

Commit

Permalink
create youtube endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradgarropy committed Nov 30, 2023
1 parent 627ca52 commit cbfea79
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/routes/api.youtube.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {json} from "@remix-run/node"

import {getLatestVideos} from "~/utils/videos"

export const loader = async () => {
const latestVideos = await getLatestVideos()
const headers = {"Cache-Control": "public, s-max-age=86400"}

return json({latestVideos}, {headers})
}

0 comments on commit cbfea79

Please sign in to comment.