fix: address CodeRabbit review findings
- docker-table: inspect refetch result instead of .catch() (TQ v5 compat) - rssFeed: sort all entries by date before slicing to max posts - toValidDate: reject null/boolean inputs before Date construction - system-resources: reset chart history when integrationIds changes - settleIntegrationQueries: wrap fn in async boundary for safe allSettled
This commit is contained in:
5 files changed
+18
-14
No files matched your search
@@ -40,12 +40,12 @@ export const rssFeedRouter = createTRPCRouter({
|
||||
logger.warn("RSS feed fetch failed", { url: urls[index], error: result.reason });
|
||||
return [];
|
||||
})
|
||||
.slice(0, input.maximumAmountPosts)
|
||||
.toSorted((entryA, entryB) => {
|
||||
return entryA.published && entryB.published
|
||||
? new Date(entryB.published).getTime() - new Date(entryA.published).getTime()
|
||||
: 0;
|
||||
});
|
||||
})
|
||||
.slice(0, input.maximumAmountPosts);
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user