Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

같은 기능을 하는 중복된 함수가 있습니다. #23

Open
DevLeti opened this issue Jan 10, 2022 · 1 comment
Open

같은 기능을 하는 중복된 함수가 있습니다. #23

DevLeti opened this issue Jan 10, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@DevLeti
Copy link
Contributor

DevLeti commented Jan 10, 2022

export function getDoctorList() {
    return axios.get("/doctor/");
}

export function getDoctor() {
    return axios.get("/doctor/");
}

patient.js에서 93~99째줄에 getDoctorList()getDoctor()이 있는데 둘이 같은 기능입니다.
getDoctor()또는 getDoctorList() 둘중 하나를 삭제하는 것이 좋다고 생각드는데, 어떤걸 지우는게 좋을까요?

@DevLeti DevLeti added the question Further information is requested label Jan 10, 2022
@phobyjun
Copy link
Member

/doctor/에 get 요청을 보낼 경우에
token이 없는 경우 list를 token이 있는 경우는 해당 doctor를 응답합니다.

또한, /doctor/<user_id>/에 get 요청을 보낼 경우는
user_id에 해당하는 doctor를 응답합니다.

api 수정 또는 함수 구현이 필요할 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants