Skip to content

Commit

Permalink
[#46] Fix: Initilize Letters - API 엔드포인트 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
MuseopKim committed Apr 7, 2021
1 parent 77a3568 commit ebbd4d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
echo REACT_APP_API_SEARCH_SONG=${{ secrets.REACT_APP_API_SEARCH_SONG }} >> .env
echo REACT_APP_API_MY_PAGE=${{ secrets.REACT_APP_API_MY_PAGE }} >> .env
echo REACT_APP_API_ACCOUNT_DELETE=${{ secrets.REACT_APP_API_ACCOUNT_DELETE }} >> .env
echo REACT_APP_API_INITIALIZE_LETTERS=${{ secrets.REACT_APP_API_INITIALIZE_LETTERS }} >> .env
- name: NPM build
run: npm run build
Expand Down
3 changes: 2 additions & 1 deletion src/api/letters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { authClient, client } from "./client";

const LETTERS_STATUS_API = process.env.REACT_APP_API_LETTERS_STATUS;
const LETTER_API = process.env.REACT_APP_API_LETTER;
const INITIALIZE_LETTERS_API = process.env.REACT_APP_API_INITIALIZE_LETTERS;

export const getLetters = async status => {
const params = {
Expand Down Expand Up @@ -68,7 +69,7 @@ export const changeLetterStatus = async (jwtToken, id, payload) => {
};

export const initializeLetters = async jwtToken => {
await authClient.delete(LETTER_API, {
await authClient.delete(INITIALIZE_LETTERS_API, {
headers: {
Authorization: AUTH.BEARER + jwtToken
}
Expand Down

0 comments on commit ebbd4d4

Please sign in to comment.