Skip to content

Commit

Permalink
fix: Keyword Detail View's broken Search Result
Browse files Browse the repository at this point in the history
  • Loading branch information
towfiqi committed Dec 21, 2022
1 parent 671f89e commit 6a1f1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/api/keywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const getKeywords = async (req: NextApiRequest, res: NextApiResponse<KeywordsGet
const lastWeekHistory :KeywordHistory = {};
historySorted.slice(-7).forEach((x:any) => { lastWeekHistory[x.dateRaw] = x.position; });
const keywordWithSlimHistory = { ...keyword, lastResult: [], history: lastWeekHistory };
const finalKeyword = domainSCData ? integrateKeywordSCData(keyword, domainSCData) : keywordWithSlimHistory;
const finalKeyword = domainSCData ? integrateKeywordSCData(keywordWithSlimHistory, domainSCData) : keywordWithSlimHistory;
return finalKeyword;
});
return res.status(200).json({ keywords: processedKeywords });
Expand Down

0 comments on commit 6a1f1d4

Please sign in to comment.