Skip to content

Commit

Permalink
fix: set force-static option on routes
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Mar 11, 2024
1 parent 3620fdd commit 66af0ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/web-app/src/app/api/feedback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Contract, InfuraProvider, JsonRpcProvider, Wallet } from "ethers"
import { NextRequest } from "next/server"
import Feedback from "../../../../contract-artifacts/Feedback.json"

export const dynamic = "force-static"

export async function POST(req: NextRequest) {
if (typeof process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS !== "string") {
throw new Error("Please, define NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS in your .env file")
Expand Down
2 changes: 2 additions & 0 deletions apps/web-app/src/app/api/join/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Contract, InfuraProvider, JsonRpcProvider, Wallet } from "ethers"
import { NextRequest } from "next/server"
import Feedback from "../../../../contract-artifacts/Feedback.json"

export const dynamic = "force-static"

export async function POST(req: NextRequest) {
if (typeof process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS !== "string") {
throw new Error("Please, define NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS in your .env file")
Expand Down

0 comments on commit 66af0ac

Please sign in to comment.