Skip to content

Commit

Permalink
feat: backend integration
Browse files Browse the repository at this point in the history
  • Loading branch information
IloveNooodles committed Aug 6, 2022
1 parent af266bf commit 6e2d6a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
VITE_APP_TITLE=
VITE_GHOST_API_URL=
VITE_GHOST_API_CONTENT_API_KEY=
VITE_IP_ADDRESS=
4 changes: 1 addition & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
VITE_APP_TITLE=KATITB2022
VITE_GHOST_API_URL=http://159.223.61.85:3000
VITE_GHOST_API_CONTENT_API_KEY=dde21a955ecdf2da49b79af663
VITE_GHOST_ADMIN_API_KEY=62dfe2ad0a5d5300017f6188:b67d6b3edf54da129c58b9423506a0b7f1f6b686c527dae9114da61e8c9c6e0d
VITE_IP_ADDRESS=159.223.61.85
VITE_GHOST_API_CONTENT_API_KEY=e4fc3ac16f182dd2fa7381e57e
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "template-fe",
"name": "annoucement-lms-fe",
"private": true,
"version": "0.0.0",
"version": "1.0.0",
"scripts": {
"preinstall": "npx only-allow yarn",
"dev": "vite",
Expand Down
5 changes: 1 addition & 4 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export const formatDate = (date: string | undefined) =>

export const formatUrl = (url: string | null) => {
if (!url) return Logo;
const newUrl = env.PROD
? url.replace('localhost', env.VITE_IP_ADDRESS)
: url;
return newUrl;
return url;
};

export const getBaseUrl = () => env.VITE_GHOST_API_URL;
Expand Down

0 comments on commit 6e2d6a2

Please sign in to comment.