Skip to content

Commit 0309134

Browse files
committed
fix: api route for static pages
1 parent e1b4741 commit 0309134

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/api/docs.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { BASE_URL } from './common'
1+
// import { BASE_URL } from './common'
22

3-
const TERMS_URL = `${BASE_URL}/terms`
3+
// NOTE: static generation only, so we can use NEXT_PUBLIC_APP_URL
4+
5+
const TERMS_URL = `${process.env.NEXT_PUBLIC_APP_URL}/api/v1/terms`
46

57
export const getTermsDoc = async (): Promise<string> => {
68
const url = new URL(TERMS_URL)
@@ -9,7 +11,7 @@ export const getTermsDoc = async (): Promise<string> => {
911
return response.text()
1012
}
1113

12-
const PRIVACY_URL = `${BASE_URL}/privacy`
14+
const PRIVACY_URL = `${process.env.NEXT_PUBLIC_APP_URL}/api/v1/privacy`
1315

1416
export const getPrivacyDoc = async (): Promise<string> => {
1517
const url = new URL(PRIVACY_URL)

0 commit comments

Comments
 (0)