import {GET} from "@/shared/api/apiClient";
import {USER_ORDERS, USER_REQUESTS} from "@/shared/constants";
import {GetUserRequestByIdResponse, GetUserRequestsResponse} from "@/shared/types/userRequests";

export const getUserRequests = async ():Promise<GetUserRequestsResponse>=>{
  const {data} = await GET<GetUserRequestsResponse>(USER_REQUESTS)
  return data
}

export const getUserRequestsById = async (id: number):Promise<GetUserRequestByIdResponse>=>{
  const {data} = await GET<GetUserRequestByIdResponse>(`${USER_REQUESTS}/${id}`)
  return data
}