mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Add validate user & optimize code from coderabbit via PR #6
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
This commit is contained in:
parent
b862f4cdb0
commit
ad0f13a1a2
3 changed files with 19 additions and 2 deletions
|
@ -81,7 +81,11 @@ const updateContent = async (url: string, tabAction: boolean) => {
|
|||
const req = await fetch(`/api/home/lt?query=${url.trim()}`);
|
||||
const data = await req.json();
|
||||
if (data) {
|
||||
const coolArray = [...data.uuidData, ...data.nuuiddata?.items];
|
||||
// Made by coderabbit: https://github.com/hpware/news-analyze/pull/6#discussion_r2144713017
|
||||
const coolArray = [
|
||||
...(data.uuidData ?? []),
|
||||
...(data.nuuiddata?.items ?? []),
|
||||
];
|
||||
contentArray.value =
|
||||
coolArray.sort(
|
||||
(title1, title2) => title2.publishTimeUnix - title1.publishTimeUnix,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue