-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from amagovpt/pre-prod
PPR to PRD
- Loading branch information
Showing
14 changed files
with
28,313 additions
and
20,802 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
// import axios from "axios"; | ||
|
||
// export const api = axios.create({ | ||
// baseURL: "http://10.55.37.16:/api/amp", | ||
// }); | ||
|
||
import axios from "axios"; | ||
|
||
import dataJSON from '../utils/data.json' | ||
|
||
const baseURLDEV = process.env.REACT_APP_AMP_DEV_SERVER; | ||
const baseURLPPR = process.env.REACT_APP_AMP_PPR_SERVER; | ||
const baseURLPRD = process.env.REACT_APP_AMP_PRD_SERVER; | ||
|
||
export const api = axios.create({ | ||
baseURL: baseURLPPR, | ||
}); | ||
|
||
export const getEvalData = async (content, currentURL) => { | ||
const response = await getEvalDataByAPI(content, currentURL); | ||
//const response = await getEvalDataByLocal(content, currentURL); | ||
|
||
return response; | ||
} | ||
|
||
const getEvalDataByAPI = async (content, currentURL) => { | ||
const response = content === "html" ? | ||
await api.post("/eval/html", { html: currentURL }) | ||
: await api.get(`/eval/${encodeURIComponent(currentURL)}`); | ||
|
||
return response; | ||
} | ||
|
||
const getEvalDataByLocal = async (content, currentURL) => { | ||
const response = dataJSON | ||
return response; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.