Skip to content

Commit

Permalink
fix bug (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjsjmine129 authored Jun 3, 2024
1 parent 6389dc0 commit 32d127d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/screens/signup/ProfileSetScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function ProfileSetScreen(props) {
// 회원가입 하고 토큰 저장하는 부분
const response = await axios.post(`${API_URL}/v1/users/email/sign-up`, {
email: signUpData.email,
nickname: signUpData.nickname,
nickname: nickname,
password: signUpData.password,
profileImageUrl: profileImage,
});
Expand Down Expand Up @@ -103,8 +103,9 @@ export default function ProfileSetScreen(props) {
console.error(err);
});

console.log('token:', signUpData.token);
try {
console.log('token:', signUpData.token);

const response = await axios.post(`${IMG_URL}/v1/upload-image`, {
images: [
{
Expand All @@ -114,7 +115,7 @@ export default function ProfileSetScreen(props) {
],
});

console.log('response image:', response.data);
console.log('response image:', response);

if (response.data.result != 'SUCCESS') {
console.log('Error: No return data');
Expand All @@ -123,6 +124,7 @@ export default function ProfileSetScreen(props) {

setProfileImage(response.data.data[0].imageUrl);
} catch (error) {
console.log('error:', error);
Toast.show({
type: 'error',
text1: 'Error',
Expand Down

0 comments on commit 32d127d

Please sign in to comment.