Showing
2 changed files
with
18 additions
and
3 deletions
... | @@ -26,7 +26,7 @@ const RegisterContainer = (props : RegisterProps) => { | ... | @@ -26,7 +26,7 @@ const RegisterContainer = (props : RegisterProps) => { |
26 | password : '', | 26 | password : '', |
27 | passwordCheck : '', | 27 | passwordCheck : '', |
28 | info : { | 28 | info : { |
29 | - doctorLicense : '', | 29 | + doctorLicense : File, |
30 | hospitalNm : '', | 30 | hospitalNm : '', |
31 | hospitalAddr : '', | 31 | hospitalAddr : '', |
32 | contact : '', | 32 | contact : '', |
... | @@ -225,9 +225,24 @@ const RegisterContainer = (props : RegisterProps) => { | ... | @@ -225,9 +225,24 @@ const RegisterContainer = (props : RegisterProps) => { |
225 | } else if(page === 2) { | 225 | } else if(page === 2) { |
226 | setPage(3); | 226 | setPage(3); |
227 | } else if(page === 3) { | 227 | } else if(page === 3) { |
228 | + | ||
229 | + const Data = new FormData(); | ||
230 | + Data.append('userId', registerForm.userId); | ||
231 | + Data.append('password', registerForm.password); | ||
232 | + Data.append('passwordCheck', registerForm.passwordCheck); | ||
233 | + | ||
234 | + Data.append('hospitalNm', registerForm.info.hospitalNm); | ||
235 | + Data.append('hospitalAddr', registerForm.info.hospitalAddr); | ||
236 | + Data.append('contact', registerForm.info.contact); | ||
237 | + Data.append('doctorNm', registerForm.info.doctorNm); | ||
238 | + Data.append('doctorType', registerForm.info.doctorType); | ||
239 | + | ||
240 | + Data.append('doctorInfoFile', registerForm.info.doctorLicense[0]); | ||
241 | + | ||
242 | + | ||
228 | const onRegisterDoctor = async () => { | 243 | const onRegisterDoctor = async () => { |
229 | try { | 244 | try { |
230 | - const result = await authApi.registerDoctor(registerForm); | 245 | + const result = await authApi.registerDoctor(Data); |
231 | if(result.data === 'Created') { | 246 | if(result.data === 'Created') { |
232 | Alert.onSuccess('회원가입 성공, 관리자의 승인을 대기하세요.', () => props.history.push('/login')); | 247 | Alert.onSuccess('회원가입 성공, 관리자의 승인을 대기하세요.', () => props.history.push('/login')); |
233 | } | 248 | } | ... | ... |
-
Please register or login to post a comment