Migrate most of the dashboard to pl-api

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-25 20:17:52 +02:00
parent 878fdd8646
commit a37d04b300
26 changed files with 260 additions and 649 deletions

View File

@ -1,14 +1,8 @@
import z from 'zod';
const makeEmojiMap = (emojis: any) => emojis.reduce((obj: any, emoji: any) => {
obj[`:${emoji.shortcode}:`] = emoji;
return obj;
}, {});
/** Normalize entity ID */
const normalizeId = (id: any): string | null => z.string().nullable().catch(null).parse(id);
export {
makeEmojiMap,
normalizeId,
};