Store bot token and chat id in their own respective fields.

This commit is contained in:
Skorpios committed 2025-02-02 23:50:09 -08:00
1 parent d3fb41acfe
commit 8f9406261f
2 files changed
+14 -6

No files matched your search

+10
View File
@@ -10,6 +10,15 @@ const NotificationSchema = mongoose.Schema(
type: String,
enum: ["email", "sms", "discord", "slack", "telegram"],
},
webhookUrl: {
type: String,
},
botToken: {
type: String,
},
chatId: {
type: String,
},
address: {
type: String,
},
@@ -76,4 +85,5 @@ NotificationSchema.pre("findOneAndUpdate", function (next) {
}
next();
});
export default mongoose.model("Notification", NotificationSchema);