import axios from 'axios'
import { IServicesSchema } from '@/types/IDB'

const ACTION_NAME = 'services-all'

export default async function loadAllActiveServices(): Promise<IServicesSchema[]> {
    const { data } = await axios.get(`/api/user/actions/${ACTION_NAME}`);
    const docs: IServicesSchema[] = data.data.docs;
    return docs;
}