11import axios from 'axios' ;
22import { GetAxiosInstance , PostAxiosInstance } from '../axios/AxiosMethod' ;
33
4+ const baseURL = import . meta. env . VITE_BASE_URL ;
5+
46export const registRequestInfo = async ( projectInfo ) => {
57 try {
68 const res = await PostAxiosInstance ( '/api/project' , projectInfo ) ;
@@ -12,7 +14,7 @@ export const registRequestInfo = async (projectInfo) => {
1214
1315export const getRequestDetail = async ( projectId ) => {
1416 try {
15- const res = await GetAxiosInstance ( `/api/project/${ projectId } ` ) ;
17+ const res = await GetAxiosInstance ( `/api/project/detail/ ${ projectId } ` ) ;
1618 return res ;
1719 } catch ( e ) {
1820 console . error ( e ) ;
@@ -21,9 +23,7 @@ export const getRequestDetail = async (projectId) => {
2123
2224export const getAllRequests = async ( page ) => {
2325 try {
24- const res = await GetAxiosInstance (
25- `/api/project/summary/pagination?page=${ page } ` ,
26- ) ;
26+ const res = await axios . get ( `${ baseURL } /api/project/summary/${ page } ` ) ;
2727 return res ;
2828 } catch ( e ) {
2929 console . error ( e ) ;
@@ -32,8 +32,26 @@ export const getAllRequests = async (page) => {
3232
3333export const getHomeRequests = async ( ) => {
3434 try {
35- const res = await axios . get (
36- `${ import . meta. env . VITE_BASE_URL } /api/project/summary/home` ,
35+ const res = await axios . get ( `${ baseURL } /api/project/summary/home` ) ;
36+ return res ;
37+ } catch ( e ) {
38+ console . error ( e ) ;
39+ }
40+ } ;
41+
42+ export const getTeamData = async ( projectId ) => {
43+ try {
44+ const res = await GetAxiosInstance ( `/api/team/${ projectId } /support/list` ) ;
45+ return res ;
46+ } catch ( e ) {
47+ console . error ( e ) ;
48+ }
49+ } ;
50+
51+ export const acceptTeam = async ( projectId , teamId ) => {
52+ try {
53+ const res = await PostAxiosInstance (
54+ `/api/project/accept/epic/${ projectId } /${ teamId } ` ,
3755 ) ;
3856 return res ;
3957 } catch ( e ) {
0 commit comments