Added experimental edit page and revision history.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import redis from './redis.js';
|
||||
|
||||
export async function getIdsBySlug(slugs, domain) {
|
||||
export async function getIdsBySlug(slugs, domain, toMap) {
|
||||
if (!slugs) {
|
||||
return [];
|
||||
}
|
||||
@@ -21,5 +21,9 @@ export async function getIdsBySlug(slugs, domain) {
|
||||
return Number(id);
|
||||
}));
|
||||
|
||||
if (toMap) {
|
||||
return Object.fromEntries(slugs.map((slug, index) => [slug, ids[index]]));
|
||||
}
|
||||
|
||||
return ids.filter(Boolean);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user