feat(admin): add categories and teams management page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
CategoryListResponse,
|
||||
CreateReportRequest,
|
||||
CreateReportResponse, FeedbackRequest, FlagRequest, FlagResponse,
|
||||
MediaUploadResponse,
|
||||
@@ -11,6 +12,9 @@ export const useReports = () => {
|
||||
const getReports = (query?: { area_id?: number; category_id?: number; status?: string }) =>
|
||||
useApiFetch<ReportListResponse>('/api/v1/reports', { method: 'GET', query })
|
||||
|
||||
const getCategories = () =>
|
||||
useApiFetch<CategoryListResponse>('/api/v1/report-categories', { method: 'GET' })
|
||||
|
||||
const createReport = (body: CreateReportRequest) =>
|
||||
useApiFetch<CreateReportResponse>('/api/v1/reports', { method: 'POST', body })
|
||||
|
||||
@@ -37,6 +41,7 @@ export const useReports = () => {
|
||||
|
||||
return {
|
||||
getReports,
|
||||
getCategories,
|
||||
createReport,
|
||||
getReportDetail,
|
||||
uploadMedia,
|
||||
@@ -46,4 +51,4 @@ export const useReports = () => {
|
||||
flagReport,
|
||||
flagMessage,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user