Sorting aggregates by slug or lowercased name to avoid capitalization issues. Fixed slug getting interpreted as ID by cache lookup.

This commit is contained in:
2024-03-27 23:54:23 +01:00
parent 768ab41ee7
commit 22c4bb0405
4 changed files with 9 additions and 7 deletions

View File

@@ -6,9 +6,11 @@ export async function getIdsBySlug(slugs, domain) {
return null;
}
/* this, naturally, fails if the slug is 69 etc.
if (Number(slug)) {
return Number(slug); // already an ID or missing
}
*/
const id = await redis.hGet(`traxxx:${domain}:id_by_slug`, slug);