claude 1 - fixes : -/
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 24m33s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 24m33s
This commit is contained in:
@@ -1,18 +1,7 @@
|
||||
// src/hooks/queries/useActivityLogQuery.ts
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import * as apiClient from '../../services/apiClient';
|
||||
|
||||
interface ActivityLogEntry {
|
||||
activity_log_id: number;
|
||||
user_id: string;
|
||||
action: string;
|
||||
entity_type: string | null;
|
||||
entity_id: number | null;
|
||||
details: any;
|
||||
ip_address: string | null;
|
||||
user_agent: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
import { fetchActivityLog } from '../../services/apiClient';
|
||||
import type { ActivityLogItem } from '../../types';
|
||||
|
||||
/**
|
||||
* Query hook for fetching the admin activity log.
|
||||
@@ -33,8 +22,8 @@ interface ActivityLogEntry {
|
||||
export const useActivityLogQuery = (limit: number = 20, offset: number = 0) => {
|
||||
return useQuery({
|
||||
queryKey: ['activity-log', { limit, offset }],
|
||||
queryFn: async (): Promise<ActivityLogEntry[]> => {
|
||||
const response = await apiClient.fetchActivityLog(limit, offset);
|
||||
queryFn: async (): Promise<ActivityLogItem[]> => {
|
||||
const response = await fetchActivityLog(limit, offset);
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json().catch(() => ({
|
||||
|
||||
Reference in New Issue
Block a user