frontend/pages/api/search.ts

16 lines
375 B
TypeScript
Raw Normal View History

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