11 lines
336 B
TypeScript
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;
|
|
} |