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

[KAN-150] fix signup bug #58

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading