import api from "../axios"; import { API_ENDPOINTS } from "../endpoints"; import { ApiResponse } from "../types"; import { TFeedback } from "../types/Feedback"; export const feedbackService = { getFeedbacks: async ( params: Record, ): Promise> => { try { return (await api.get(API_ENDPOINTS.FEEDBACK.READ_ALL, { params })).data; } catch (error) { console.error("ERROR Caught in feedback service => getFeedbacks", error); throw error; } }, getSingleFeedback: async ( id: string, ): Promise> => { try { return (await api.get(API_ENDPOINTS.FEEDBACK.DETAILS(id))).data; } catch (error) { console.error( "ERROR Caught in feedback service => getSingleFeedback", error, ); throw error; } }, };