File tree Expand file tree Collapse file tree 9 files changed +31
-32
lines changed
Expand file tree Collapse file tree 9 files changed +31
-32
lines changed Original file line number Diff line number Diff line change 4141 "postcss" : " ^8.5.3" ,
4242 "prettier" : " ^3.5.3" ,
4343 "tailwindcss" : " ^4.0.14" ,
44- "typescript" : " ^5"
44+ "typescript" : " ^5.8.2 "
4545 }
4646}
Original file line number Diff line number Diff line change 11import axiosInstance from "./axiosInstance" ;
2- import { apiRoutes } from "./apiRoutes" ;
32import { UserType } from "@/types/users" ;
3+ import { TEAM_ID } from "@/constants/team" ;
44
55interface AuthResponse extends UserType {
66 accessToken : string ;
@@ -13,10 +13,13 @@ export const postAuthData = async ({
1313 email : string ;
1414 password : string ;
1515} ) => {
16- const response = await axiosInstance . post < AuthResponse > ( apiRoutes . login ( ) , {
17- email,
18- password,
19- } ) ;
16+ const response = await axiosInstance . post < AuthResponse > (
17+ `${ TEAM_ID } /auth/login` ,
18+ {
19+ email,
20+ password,
21+ }
22+ ) ;
2023
2124 return response . data ;
2225} ;
Original file line number Diff line number Diff line change 11import axiosInstance from "./axiosInstance" ;
22import type { CardDetailType } from "@/types/cards" ; // Dashboard 타입 import
33import { apiRoutes } from "@/api/apiRoutes" ;
4+ import { TEAM_ID } from "@/constants/team" ;
45
56/** 1. 카드 이미지 업로드 */
67export const uploadCardImage = async ( {
@@ -14,7 +15,7 @@ export const uploadCardImage = async ({
1415 formData . append ( "image" , imageFile ) ;
1516
1617 const response = await axiosInstance . post (
17- apiRoutes . columnCardImage ( columnId ) ,
18+ `/ ${ TEAM_ID } /columns/ ${ columnId } /card-image` ,
1819 formData ,
1920 {
2021 headers : {
@@ -46,7 +47,7 @@ export const createCard = async ({
4647 tags : string [ ] ;
4748 imageUrl ?: string ;
4849} ) => {
49- const response = await axiosInstance . post ( apiRoutes . cards ( ) , {
50+ const response = await axiosInstance . post ( `/ ${ TEAM_ID } / cards` , {
5051 assigneeUserId,
5152 dashboardId,
5253 columnId,
Original file line number Diff line number Diff line change 11import { ColumnType } from "@/types/task" ;
22import axiosInstance from "./axiosInstance" ;
33import { apiRoutes } from "./apiRoutes" ;
4+ import { TEAM_ID } from "@/constants/team" ;
45
56// 칼럼 생성
67export const createColumn = async ( {
@@ -10,7 +11,7 @@ export const createColumn = async ({
1011 title : string ;
1112 dashboardId : number ;
1213} ) : Promise < ColumnType > => {
13- const res = await axiosInstance . post ( apiRoutes . columns ( ) , {
14+ const res = await axiosInstance . post ( `/ ${ TEAM_ID } / columns` , {
1415 title,
1516 dashboardId,
1617 } ) ;
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ import {
55 UpdateCommenttype ,
66 DeleteCommentParams ,
77} from "../types/comments" ;
8+ import { TEAM_ID } from "@/constants/team" ;
89
910// 댓글 생성
1011export const createComment = async ( data : CreateCommentType ) => {
11- const response = await axiosInstance . post ( apiRoutes . comments ( ) , data ) ;
12+ const response = await axiosInstance . post ( `/ ${ TEAM_ID } / comments` , data ) ;
1213 return response . data ;
1314} ;
1415
Original file line number Diff line number Diff line change 11import axiosInstance from "./axiosInstance" ;
22import { apiRoutes } from "./apiRoutes" ;
3+ import { TEAM_ID } from "@/constants/team" ;
34
45export interface Dashboard {
56 id : number ;
@@ -19,7 +20,7 @@ export const createDashboard = async ({
1920 title : string ;
2021 color : string ;
2122} ) => {
22- const res = await axiosInstance . post ( apiRoutes . dashboards ( ) , {
23+ const res = await axiosInstance . post ( `/ ${ TEAM_ID } / dashboards` , {
2324 title,
2425 color,
2526 } ) ;
@@ -30,7 +31,7 @@ export const createDashboard = async ({
3031export const getDashboards = async ( {
3132 navigationMethod = "pagination" ,
3233 page = 1 ,
33- size = 10 ,
34+ size = 100 ,
3435} : {
3536 navigationMethod ?: "pagination" ;
3637 page ?: number ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import axiosInstance from "./axiosInstance";
22import { apiRoutes } from "./apiRoutes" ;
33import { UpdateUser , UserMeImage } from "@/types/users" ;
44import { UserType } from "@/types/users" ;
5+ import { TEAM_ID } from "@/constants/team" ;
56
67interface SignUpRequest {
78 email : string ;
@@ -12,7 +13,7 @@ interface SignUpRequest {
1213// 회원가입 (POST)
1314export const signUp = async ( { payload } : { payload : SignUpRequest } ) => {
1415 const response = await axiosInstance . post < SignUpRequest > (
15- apiRoutes . users ( ) ,
16+ `/ ${ TEAM_ID } / users` ,
1617 payload
1718 ) ;
1819 return response . data ;
@@ -38,10 +39,14 @@ export const updateProfile = async (data: UpdateUser) => {
3839export const uploadProfileImage = async (
3940 formData : FormData
4041) : Promise < UserMeImage > => {
41- const response = await axiosInstance . post ( apiRoutes . userMeImage ( ) , formData , {
42- headers : {
43- "Content-Type" : "multipart/form-data" ,
44- } ,
45- } ) ;
42+ const response = await axiosInstance . post (
43+ `/${ TEAM_ID } /users/me/image` ,
44+ formData ,
45+ {
46+ headers : {
47+ "Content-Type" : "multipart/form-data" ,
48+ } ,
49+ }
50+ ) ;
4651 return response . data ;
4752} ;
You can’t perform that action at this time.
0 commit comments