-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#91 [FEAT] 내 명함 & 남의 명함 API 기본 셋팅, HomePage에 API 일부 연결
- Loading branch information
Showing
7 changed files
with
108 additions
and
22 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { authAxios } from '../axios'; | ||
|
||
// 전체 명함 조회 | ||
export const getCards = async ({ member_id }) => { | ||
const response = await authAxios.get(`/cards/${member_id}`); | ||
// console.log(response.data.result); | ||
return response; | ||
}; | ||
|
||
// 명함 생성 | ||
export const postCards = async ({ member_id, data }) => { | ||
const response = await authAxios.post(`/cards/${member_id}`, data); | ||
// console.log(response); | ||
return response; | ||
}; | ||
|
||
// 명함 삭제 | ||
export const deleteCards = async ({ card_id }) => { | ||
const response = await authAxios.delete(`/cards/${card_id}`); | ||
// console.log(response); | ||
return response; | ||
}; | ||
|
||
// 명함 수정 | ||
export const putCards = async ({ card_id, data }) => { | ||
const response = await authAxios.put(`/cards/${card_id}`, data); | ||
// console.log(response); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { authAxios } from '../axios'; | ||
|
||
// 내 명함 가져오기 | ||
export const getMyCard = async ({ member_id }) => { | ||
const response = await authAxios.get(`/me/${member_id}`); | ||
console.log(response); | ||
return response; | ||
}; | ||
|
||
// 내 명함 생성 | ||
export const postMyCard = async ({ member_id, data }) => { | ||
const response = await authAxios.post(`/categories/${member_id}`, data); | ||
console.log(response); | ||
return response; | ||
}; | ||
|
||
// 내 명함 삭제 | ||
export const deleteMyCard = async (member_id) => { | ||
const response = await authAxios.delete(`/me/${member_id}`); | ||
console.log(response); | ||
return response; | ||
}; | ||
|
||
// 내 명함 수정 | ||
export const putMyCard = async ({ member_id, data }) => { | ||
const response = await authAxios.put(`/me/${member_id}`, data); | ||
console.log(response); | ||
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