import xFetch from './xFetch';
import {serialize} from '../utils';


export async function fetchList(query) {
    return xFetch('/api/authInfo/audits' + '?' + serialize({s: 30, ...query}));
}

export async function fetchItem(id) {
    return xFetch('/api/authInfo/audits/' + id);
}

export async function pass(data) {
    return xFetch('/api/authInfo/audits/' + data.id, {
        method: 'PATCH',
        body: serialize(data)
    });
}
