Skip to content

Commit

Permalink
Taxonomy endpoint isnt' supposed to be protected by session
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Jun 6, 2024
1 parent 9bfd535 commit 5ca91f4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/pages/api/taxonomy/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import { NextApiHandler } from 'next';
import { getServerSession } from 'next-auth';
import { authOptions } from '../auth/[...nextauth]';
import { getSearchAdapter } from '@/lib/adapters/search/get-search-adapter';
import { SuggestConfig } from '@/lib/adapters/search/BaseSearchAdapter';

const FavoriteListHandler: NextApiHandler = async (req, res) => {
const session = await getServerSession(req, res, authOptions);
const searchAdapter = await getSearchAdapter();

if (!session) {
res.status(401);
return;
}

if (req.method === 'GET') {
try {
const data = await searchAdapter.suggest(req.query as SuggestConfig);
Expand Down

0 comments on commit 5ca91f4

Please sign in to comment.