feat: enhance layout of search

This commit is contained in:
2023-08-06 17:47:26 +02:00
parent 0e0d26c939
commit 6f650b568d
25 changed files with 518 additions and 172 deletions

View File

@@ -2,6 +2,10 @@ import { Handlers } from "$fresh/server.ts";
import { BadRequestError } from "@lib/errors.ts";
import { getTypeSenseClient } from "@lib/typesense.ts";
import { json } from "@lib/helpers.ts";
import { getArticle } from "@lib/resource/articles.ts";
import { getMovie } from "@lib/tmdb.ts";
import { getRecipe } from "@lib/resource/recipes.ts";
import { getDocument } from "@lib/documents.ts";
export const handler: Handlers = {
async GET(req, _ctx) {
@@ -30,8 +34,9 @@ export const handler: Handlers = {
q: query,
query_by,
filter_by,
per_page: 50,
});
return json(searchResults.hits);
return json(searchResults);
},
};