a
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user