From 4c39eb8799deaf642f0cd2d1f9f58d03cc8890f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 5 Oct 2023 02:05:12 -0400 Subject: [PATCH] refactor(db/models): update color field in sidebarentry to accept either a string or an enum --- models/sidebarEntry.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/sidebarEntry.ts b/models/sidebarEntry.ts index de2fb32..7b441b2 100644 --- a/models/sidebarEntry.ts +++ b/models/sidebarEntry.ts @@ -13,7 +13,7 @@ export enum Color { } export interface ISidebarItem { - color: Color; + color: Color | string; url: string; linkTitle: string; index: number; @@ -22,7 +22,6 @@ export interface ISidebarItem { const SISchema = new mongoose.Schema({ color: { type: String, - enum: Object.values(Color), }, url: { type: String,