Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feature/frontcicd
  • Loading branch information
JangHyun0247 committed Aug 6, 2024
2 parents 8381197 + 92c1b8e commit a25cb4f
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 20 deletions.
11 changes: 11 additions & 0 deletions .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# itsmien-frontend
# itsmine-frontend
itsmine frontend repository
2 changes: 1 addition & 1 deletion frontend/src/components/auth/Signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SignIn = ({onLogin}) => {
event.preventDefault();

try {
const response = await axiosInstance.post('/users/login', loginRequest);
const response = await axiosInstance.post('/v1/users/login', loginRequest);

// 응답 바디에서 토큰 추출
const token = response.data.data;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/auth/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SignUp = () => {
event.preventDefault();

try {
await axiosInstance.post('/users', signupRequest);
await axiosInstance.post('/v1/users', signupRequest);

console.log('Signup successful!');
navigate('/itsmine/login');
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/chat/Board.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Board = ({ currentUserId }) => {
setLoading(true);
setError(null);

const response = await axiosInstance.get('/chatrooms');
const response = await axiosInstance.get('/v1/chatrooms');
const { data } = response;

if (data && Array.isArray(data.data)) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Chat = () => {
setLoading(true);
setError(null);

const response = await axiosInstance.get('/chatrooms');
const response = await axiosInstance.get('/v1/chatrooms');
console.log('방 목록 응답:', response);

const { data } = response;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/chat/ChatWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ChatWindow = ({ room, onClose }) => {
// 초기 메시지 로드
const fetchMessages = async () => {
try {
const response = await axiosInstance.get(`/chatrooms/${roomId}`);
const response = await axiosInstance.get(`/v1/chatrooms/${roomId}`);
setMessages(response.data.data || []);
} catch (error) {
console.error('Failed to fetch messages:', error);
Expand Down Expand Up @@ -103,7 +103,7 @@ const ChatWindow = ({ room, onClose }) => {
// 채팅방 나가기 및 페이지 새로고침 함수
const handleLeaveAndRefresh = async () => {
try {
await axiosInstance.delete(`/chatrooms/${roomId}`);
await axiosInstance.delete(`/v1/chatrooms/${roomId}`);
console.log('Successfully left the chat room.');
} catch (error) {
console.error('Failed to leave the chat room:', error);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/createproduct/CreateProduct.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ProductCreatePage = () => {
useEffect(() => {
const fetchCategories = async () => {
try {
const response = await axiosInstance.get('/categories');
const response = await axiosInstance.get('/v1/categories');
setCategories(response.data.data);
} catch (error) {
console.error('Error fetching categories:', error);
Expand All @@ -54,7 +54,7 @@ const ProductCreatePage = () => {

try {
const response = await axiosInstance.post(
'http://localhost:8080/s3/upload',
'http://localhost:8080/v1/s3/upload',
formData, {
headers: {
'Content-Type': 'multipart/form-data'
Expand Down Expand Up @@ -93,7 +93,7 @@ const ProductCreatePage = () => {
}
};

await axiosInstance.post('http://localhost:8080/products', productData, {
await axiosInstance.post('http://localhost:8080/v1/products', productData, {
headers: {
Authorization: token
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/item/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Item = ({
// 제품 정보를 가져오는 함수
const fetchProduct = async () => {
try {
const response = await axiosInstance.get(`/products/${productId}`);
const response = await axiosInstance.get(`/v1/products/${productId}`);
const productData = response.data.data;
setProduct(productData);

Expand All @@ -47,7 +47,7 @@ const Item = ({
}, [productId]);

const goToDetail = () => {
navigate(`/products/${productId}`);
navigate(`/v1/products/${productId}`);
};

const nextImage = (e) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/item/ItemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const ItemList = () => {

try {
const response = await axiosInstance.get(
`/products/all?page=${page}&size=${limit}${categoryString}${priceString}&search=${userInput}&sort=${optionValue}`
`/v1/products/all?page=${page}&size=${limit}${categoryString}${priceString}&search=${userInput}&sort=${optionValue}`
);

if (!response.data.data.content) {
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/profile/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Profile = () => {
useEffect(() => {
const fetchUserProfile = async () => {
try {
const response = await axiosInstance.get('/users/profile');
const response = await axiosInstance.get('/v1/users/profile');
const userData = response.data.data;
setProfile(userData);

Expand All @@ -75,7 +75,7 @@ const Profile = () => {
useEffect(() => {
const fetchProducts = async () => {
try {
const response = await axiosInstance.get('/products/user', {
const response = await axiosInstance.get('/v1/products/user', {
params: {
page,
size,
Expand All @@ -97,7 +97,7 @@ const Profile = () => {
useEffect(() => {
const fetchLikedProducts = async () => {
try {
const response = await axiosInstance.get('/products/likes', {
const response = await axiosInstance.get('/v1/products/likes', {
params: {
page,
size,
Expand All @@ -119,7 +119,7 @@ const Profile = () => {
useEffect(() => {
const fetchAuctions = async () => {
try {
const response = await axiosInstance.get('/auctions', {
const response = await axiosInstance.get('/v1/auctions', {
params: {
page,
size,
Expand Down Expand Up @@ -155,7 +155,7 @@ const Profile = () => {
formData.append('file', file);

try {
const response = await axiosInstance.post('/s3/upload/profile', formData, {
const response = await axiosInstance.post('/v1/s3/upload/profile', formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Main() {

useEffect(() => {
// Board에 필요한 데이터 가져오기
axiosInstance.get('/chatrooms')
axiosInstance.get('/v1/chatrooms')
.then(response => {
setChatRooms(response.data);
})
Expand Down

0 comments on commit a25cb4f

Please sign in to comment.