mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-24 06:45:59 +03:00
search: stubs out search query endpoint
This commit is contained in:
parent
1b4168e48f
commit
65b847188e
14
pages/api/search/[query].js
Normal file
14
pages/api/search/[query].js
Normal file
@ -0,0 +1,14 @@
|
||||
import * as MW from "~/node_common/middleware";
|
||||
|
||||
const initCORS = MW.init(MW.CORS);
|
||||
const initAuth = MW.init(MW.RequireCookieAuthentication);
|
||||
|
||||
export default async (req, res) => {
|
||||
initCORS(req, res);
|
||||
initAuth(req, res);
|
||||
|
||||
return res.status(200).send({
|
||||
decorator: "SERVER_SEARCH_QUERY",
|
||||
data: { query: req.query.query },
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue
Block a user