Skip to content

Commit

Permalink
fix(general): pass env url to rest client
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanddd committed Sep 18, 2023
1 parent 2ac03ac commit 884031d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 47 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"dependencies": {
"@bonfida/spl-name-service": "^1.0.11",
"@consolelabs/mochi-rest": "^2.0.10",
"@consolelabs/mochi-ui": "^9.1.21",
"@consolelabs/mochi-rest": "^3.0.0",
"@consolelabs/mochi-ui": "^10.0.0",
"@discordjs/builders": "^0.12.0",
"@discordjs/rest": "^0.5.0",
"@haileybot/captcha-generator": "^1.7.0",
Expand Down
91 changes: 48 additions & 43 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import API from "@consolelabs/mochi-rest"
import { DEV, PREVIEW } from "env"
import {
MOCHI_PAY_API_SERVER_HOST,
API_SERVER_HOST,
MOCHI_PROFILE_API_SERVER_HOST,
} from "env"

export default new API({
preview: DEV || PREVIEW,
payUrl: MOCHI_PAY_API_SERVER_HOST,
baseUrl: API_SERVER_HOST,
profileUrl: MOCHI_PROFILE_API_SERVER_HOST,
})

0 comments on commit 884031d

Please sign in to comment.