Files
homarr/packages/icons/src/auto-icon-searcher.ts
2024-12-31 11:40:37 +01:00

10 lines
291 B
TypeScript

import type { Database } from "@homarr/db";
import { like } from "@homarr/db";
import { icons } from "@homarr/db/schema";
export const getIconForNameAsync = async (db: Database, name: string) => {
return await db.query.icons.findFirst({
where: like(icons.name, `%${name}%`),
});
};