ironGym/webapp/src/functions/requests/members/searchForServices.ts
2025-06-19 23:16:02 +03:00

11 lines
336 B
TypeScript

import axios from 'axios'
import { IServicesSchema } from '@/types/IDB'
const ACTION_NAME = 'services'
export default async function searchForServices(s : string)
{
let { data } = await axios.get(`/api/user/actions/${ACTION_NAME}?type=search&searchKeyword=`+s)
let docs : IServicesSchema[] = data.data.docs;
return docs;
}