Files
tm_panel/src/lib/api/services/portals-service.ts
T
AmirReza Jamali 9202f9a271
continuous-integration/drone/push Build is passing
feat(dashboard): add scrape portals widget to dashboard
Surface AI pipeline portal sources on the dashboard instead of a standalone page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 10:22:58 +03:30

15 lines
551 B
TypeScript

import api from "../axios";
import { API_ENDPOINTS } from "../endpoints";
import { ApiResponse, PortalsListResponseSchema, TPortal } from "../types";
export const portalsService = {
getPortals: async (): Promise<ApiResponse<TPortal[]>> => {
try {
const response = await api.get(API_ENDPOINTS.PORTALS.GET);
return PortalsListResponseSchema.parse(response.data);
} catch (error) {
console.error("ERROR caught in portals service => getPortals", error);
throw error;
}
},
};