feat: implement API composables for authentication and data fetching
- Add useApiFetch composable for HTTP requests with auth token - Implement useAuth composable for authentication endpoints - Add useAdmin composable for admin operations - Add useOperator composable for operator management - Add useMembers composable for member data - Add usePublic composable for public reports - Add useReports composable for report operations Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import type { OpenDataReportListResponse } from "~/types/api";
|
||||
|
||||
export default function usePublic() {
|
||||
const getOpenDataReports = (query?: { page?: number; per_page?: number }) =>
|
||||
useApiFetch<OpenDataReportListResponse>('/api/v1/open-data/reports', { method: 'GET', query })
|
||||
|
||||
return { getOpenDataReports }
|
||||
}
|
||||
Reference in New Issue
Block a user