Skip to content

Commit 84b1a4c

Browse files
committed
Merge branch 'develop' of https://github.com/IT-Pick/IT-Pick-Frontend into feat-clicelee/vote
2 parents bd5872e + b729a94 commit 84b1a4c

File tree

81 files changed

+1593
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1593
-502
lines changed

src/App.css

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
filter: drop-shadow(0 0 2em #61dafbaa);
1919
}
2020

21+
2122
@keyframes logo-spin {
2223
from {
2324
transform: rotate(0deg);
@@ -40,3 +41,4 @@
4041
.read-the-docs {
4142
color: #888;
4243
}
44+

src/apis/emailDuplicateCheck.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import axios from 'axios';
2+
3+
export const emailDuplicateCheck = async (email: string) => {
4+
const response = await axios.get(`/auth/email/check`, {
5+
params: {
6+
email: encodeURIComponent(email),
7+
},
8+
});
9+
10+
return response.data;
11+
};

src/apis/getEmailVerification.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import axios from "axios";
2+
3+
export const getEmailVerficiation = async (email: string, verificationCode: string) => {
4+
const response = await axios.get(`/auth/emails/verifications`, {
5+
params: {
6+
email: email,
7+
code: verificationCode,
8+
},
9+
});
10+
11+
return response.data;
12+
}

src/apis/loginUser.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import axios from 'axios';
2+
3+
export const loginUser = async (email: string, password: string) => {
4+
try {
5+
const response = await axios.post('/auth/login', {
6+
email, // encodeURIComponent 제거
7+
password, // encodeURIComponent 제거
8+
});
9+
10+
return response.data;
11+
} catch (error) {
12+
throw error;
13+
}
14+
};

src/apis/nicknameDuplicateCheck.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import axios from 'axios';
2+
3+
export const nicknameDuplicateCheck = async (nickname: string) => {
4+
const response = await axios.get(`/auth/nickname/check`, {
5+
params: {
6+
nickname: nickname,
7+
},
8+
});
9+
10+
return response.data;
11+
};

src/apis/refreshAccessToken.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import axios from 'axios';
2+
3+
export const refreshAccessToken = async (refreshToken: string) => {
4+
try {
5+
const response = await axios.post('/auth/refresh', {
6+
refreshToken,
7+
});
8+
9+
if (response.data.code === 1000) {
10+
return response.data.result.refreshToken;
11+
} else {
12+
throw new Error(`Error: ${response.data.code}`);
13+
}
14+
} catch (error) {
15+
throw error;
16+
}
17+
};

src/apis/sendEmailVerification.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import axios from "axios";
2+
3+
export const sendEmailVerification = async (email: string) => {
4+
const response = await axios.post(
5+
`/auth/emails/verification-requests`, null,
6+
{
7+
params: {
8+
email: email,
9+
},
10+
headers: {
11+
'Content-Type': 'application/json',
12+
},
13+
}
14+
);
15+
16+
return response.data;
17+
};

src/apis/signUp.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import axios from 'axios';
2+
3+
interface SignUpRequest {
4+
email: string;
5+
password: string;
6+
nickname: string;
7+
birth_date: string;
8+
likedTopics: string[];
9+
}
10+
11+
export const signUp = async (request: SignUpRequest) => {
12+
const response = await axios.post('/auth/signup', request, {
13+
headers: {
14+
'Content-Type': 'application/json',
15+
},
16+
});
17+
18+
return response.data;
19+
};
+5
Loading
Loading
Loading
Loading
Loading

src/assets/images/24x24/ico_heart.png

647 Bytes
Loading
Loading
Loading

src/assets/images/24x24/ico_more.svg

+10
Loading
Loading

src/assets/images/40x40/ico_culture.svg

+9
Loading

src/assets/images/40x40/ico_food.svg

+9
Loading

src/assets/images/40x40/ico_letter.svg

+9
Loading

src/assets/images/40x40/ico_lightbulb.svg

+9
Loading

src/assets/images/40x40/ico_money.svg

+9
Loading

src/assets/images/40x40/ico_music.svg

+9
Loading

src/assets/images/40x40/ico_sports.svg

+9
Loading

src/assets/images/40x40/ico_travel.svg

+9
Loading

src/assets/images/40x40/ico_world.svg

+9
Loading
+1-1
Loading
+1-1
Loading

src/assets/images/ico_dot_point.svg

+3
Loading

0 commit comments

Comments
 (0)