Skip to content

Commit

Permalink
Merge pull request #11 from stifskere/dev
Browse files Browse the repository at this point in the history
fix: cache
  • Loading branch information
stifskere authored May 16, 2024
2 parents 2f1ed2b + 7236d3c commit 1f61a34
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/github/gists/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {NextResponse} from "next/server";
import {githubRequestInit} from "@/app/github/github-constants";

export const revalidate = 3600;
export const revalidate: number = 3600;

const pinnedGists: string[] = ["PortfolioIntroduction.md", "C# Tutorial.cs"];

Expand Down
2 changes: 2 additions & 0 deletions src/app/github/rating/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {NextResponse} from "next/server";
import {githubRequestInit} from "@/app/github/github-constants";

export const revalidate: number = 1800

export async function GET(): Promise<NextResponse<GithubRatingWithMark>> {
const profile: GithubProfile = await fetch(
"https://api.github.com/users/stifskere",
Expand Down
2 changes: 1 addition & 1 deletion src/app/github/repos/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {NextResponse} from "next/server";
import {githubRequestInit} from "@/app/github/github-constants";

export const revalidate = 3600;
export const revalidate: number = 3600;

export async function GET(): Promise<NextResponse<GithubRepository[] | null>> {
const repositoryResponse: Response
Expand Down
2 changes: 2 additions & 0 deletions src/app/spotify/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {SpotifyPoller} from "@/app/spotify/spotify-poller";
import {NextResponse} from "next/server";

export const revalidate: number = 0;

export async function GET(): Promise<NextResponse<SpotifySong | null>> {
try {
return NextResponse.json(await SpotifyPoller.getCurrentlyPlaying());
Expand Down

0 comments on commit 1f61a34

Please sign in to comment.