박권수

feat. API implement

module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
}
};
This diff could not be displayed because it is too large.
......@@ -41,5 +41,11 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"eslint": "^7.32.0",
"eslint-plugin-react": "^7.24.0"
}
}
......
import { client } from "./client";
export const authApi = {
register : (Data : Object) => {
register : (Data : FormData) => {
return client.post('/auth/register', Data);
},
login : (Data : Object) => {
registerDoctor : (Data : FormData) => {
return client.post('/auth/register/doctor', Data);
},
login : (Data : FormData) => {
return client.post('/auth/login', Data);
},
......
import { client } from "./client";
import { RecoilState } from "recoil";
export const doctorApi = {
getPatientList : (token : RecoilState<any>) => {
return client.get('/doctor/patient', {
headers : {
Authorization : token,
},
});
},
getPatientDetail : (token : RecoilState<any>, PatientId : string) => {
return client.get(`/doctor/patient/${PatientId}`, {
headers : {
Authorization : token,
},
});
},
getPatientBottleDetail : (token : RecoilState<any>, BottleId : string) => {
return client.get(`/doctor/bottle/${BottleId}`, {
headers : {
Authorization : token,
},
});
},
writePatientInfo : (token : RecoilState<any>, Data : FormData) => {
return client.patch('/doctor/patient', Data, {
headers : {
Authorization : token,
},
});
},
writeBottleFeedback : (token : RecoilState<any>, Data : FormData) => {
return client.post('/doctor/bottle', Data, {
headers : {
Authorization : token,
},
});
},
registerPatient : (token : RecoilState<any>, Data : FormData) => {
return client.post('/doctor/patient', Data, {
headers : {
Authorization : token,
},
});
},
removePatient : (token : RecoilState<any>, PatientId : string) => {
return client.delete(`/doctor/patient/${PatientId}`, {
headers : {
Authorization : token,
},
});
},
};
\ No newline at end of file
......@@ -5,8 +5,22 @@ export const userApi = {
getMyInfo : (token : RecoilState<any>) => {
return client.get('/user', {
headers : {
authorization : token,
Authorization : token,
},
});
},
getDoctorRegisterRequest : (token : RecoilState<any>) => {
return client.get('/user/doctorrequest', {
headers : {
Authorization : token,
},
});
},
acceptDoctorRegister : (token : RecoilState<any>, Data : FormData) => {
return client.post('/user/doctorrequest/', Data, {
headers : {
Authorization : token,
}
});
},
};
\ No newline at end of file
......
This diff could not be displayed because it is too large.