mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-19 16:07:32 -03:00
fix: Arregladas updates del panel de admin
This commit is contained in:
@@ -2,9 +2,10 @@ import { apiBase } from '@/stores/url';
|
||||
import { sesionStore } from '@/stores/usuario';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
export async function busquedaAdminUsuarios(q: string, limit = 5, page = 1) {
|
||||
export async function busquedaAdminUsuarios(q: string, limit = 5, page = 1, fetch2?: Function) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
const fetchFn = fetch2 ? fetch2 : fetch;
|
||||
const response = await fetchFn(
|
||||
get(apiBase) +
|
||||
`/api/admin/users${q ? `?q=${q}` : ''}${q ? '&' : '?'}page=${page}&pageSize=${limit}`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user