frontend/pages/api/search.ts
Firesieht 81c649d102 bigs
2022-10-22 19:11:56 +03:00

16 lines
375 B
TypeScript

import * as axios from 'axios'
import {INode} from '../../store/reducers/nodesInputReducer'
import { fetcher } from './fetch'
export default async (nodes: INode[]) => {
console.log("SEARCH", nodes)
const res = await fetcher.post('/search', {
body: nodes,
limit: 10,
offset: 0
});
console.log("SEARCHRES", res)
return res.data;
}