Skip to content

Commit

Permalink
fix(*): update env
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed May 27, 2024
1 parent 2d17b3f commit c803693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/API/ArticlesAPI.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function ArticlesAPI() {

useEffect(() => {
const getArticles = async () => {
const username = process.env.USERNAME || 'admin';
const password = process.env.PASSWORD || 'password';
const username = process.env.REACT_APP_USERNAME || "admin";
const password = process.env.REACT_APP_PASSWORD || "password";
const auth = getBasicAuth(username, password);
const res = await axios.get(`/api/articles`, {
headers: {
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Articles/CreateArticle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ function CreateArticle() {
...article,
["slug"]: article.title.toLowerCase().replace(/ /g, "-"),
});
const username = process.env.USERNAME || "admin";
const password = process.env.PASSWORD || "password";
const username = process.env.REACT_APP_USERNAME || "admin";
const password = process.env.REACT_APP_PASSWORD || "password";
const auth = getBasicAuth(username, password);
await axios.post(
"/api/articles",
Expand Down

0 comments on commit c803693

Please sign in to comment.