mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -268,10 +268,10 @@ export const UserProvider = ({ children }) => {
|
||||
|
||||
// ─── GET /api/admin/users/:id/activity ────────────────────────────────────
|
||||
const fetchUserActivity = useCallback(
|
||||
async (userId, { page = 1, limit = 20, action = undefined } = {}) => {
|
||||
async (userId, { page = 1, limit = 20, action = undefined, from = undefined, to = undefined } = {}) => {
|
||||
setActivityLoading(true);
|
||||
try {
|
||||
const res = await api.get(`${BASE}/users/${userId}/activity`, { params: { page, limit, action } });
|
||||
const res = await api.get(`${BASE}/users/${userId}/activity`, { params: { page, limit, action, from, to } });
|
||||
const d = res.data?.data;
|
||||
setActivity(d?.activities ?? []);
|
||||
setActivityPagination({
|
||||
|
||||
Reference in New Issue
Block a user