diff --git a/pages/api/search/slates/[query].js b/pages/api/search/slates/[query].js index a7f94f62..da2d5976 100644 --- a/pages/api/search/slates/[query].js +++ b/pages/api/search/slates/[query].js @@ -15,7 +15,7 @@ export default async (req, res) => { if (req.body.data.deeplink) { if (slates.length) { - const slate = { ...slates[0] }; + const slate = slates.filter((item) => item.slatename === query)[0]; const user = await Data.getUserById({ id: slate.data.ownerId }); slate.user = Serializers.user(user);