This commit is contained in:
MythEclipse
2026-06-06 00:42:10 +07:00
parent 5c480cea59
commit 0dbd2b22c7
9 changed files with 8 additions and 17 deletions
+1
View File
@@ -8,6 +8,7 @@ export const boosterRoles = pgTable(
roleId: text("role_id").notNull(),
name: text("name").notNull(),
color: text("color"),
color2: text("color2"),
icon: text("icon"),
createdAt: bigint("created_at", { mode: "number" }).notNull(),
updatedAt: bigint("updated_at", { mode: "number" }).notNull()
+4
View File
@@ -75,6 +75,10 @@ export function normalizeHexColor(color: string): `#${string}` {
return normalizedColor as `#${string}`;
}
export function normalizeOptionalHexColor(color: string | null): `#${string}` | null {
return color ? normalizeHexColor(color) : null;
}
function normalizeName(name: string): string {
return name.trim().toLowerCase();
}