Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update tags.ts

Tim Wilsona148c3c59bb7
diff --git a/apps/web/lib/zod/schemas/tags.ts b/apps/web/lib/zod/schemas/tags.ts
index dc2d93868e..5068e1f0d5 100644
--- a/apps/web/lib/zod/schemas/tags.ts
+++ b/apps/web/lib/zod/schemas/tags.ts
@@ -41,12 +41,14 @@ export const getTagsCountQuerySchema = getTagsQuerySchema.omit({
pageSize: true,
});
+// TODO: Remove "pink" after confirming we don't have any pink tags in the database
+const tagColors = [...RESOURCE_COLORS, "pink"] as const;
+
export const tagColorSchema = z
- // TODO: Remove "pink" after confirming we don't have any pink tags in the database
- .enum([...RESOURCE_COLORS, "pink"], {
+ .enum(tagColors, {
errorMap: () => {
return {
- message: `Invalid color. Must be one of: ${RESOURCE_COLORS.join(", ")}`,
+ message: `Invalid color. Must be one of: ${tagColors.join(", ")}`,
};
},
})