summaryrefslogtreecommitdiff
path: root/routes/search.js
blob: e87a790b5ece05d9b00c7414e0a90c3994c9e067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"use strict";

const apibay = require('../server/js/apibay');
const template = require('../server/js/template');

async function search(req, res)
{
	let query = req.body.search;
	let results = await apibay.hit(query);
	res.render('result', {query: query, results: results, functions: template});
};

module.exports = search;