mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
* 📅 feat: Add 2025 roadmap blog post with upcoming features and partnerships * 🔨 refactor: Migrate Subscriber model to TypeScript and update API handler for type safety * chore: remove comment * fix: build issues with numeric blog tag * chore: update discussion links in 2025 roadmap blog post
25 lines
494 B
TypeScript
25 lines
494 B
TypeScript
import mongoose, { Schema, Model, Document } from 'mongoose'
|
|
|
|
interface ISubscriber extends Document {
|
|
email: string
|
|
status: string
|
|
}
|
|
|
|
const SubscriberSchema = new Schema({
|
|
email: {
|
|
type: String,
|
|
lowercase: true,
|
|
required: true,
|
|
unique: true,
|
|
},
|
|
status: {
|
|
type: String,
|
|
default: 'subscribed',
|
|
},
|
|
})
|
|
|
|
const Subscriber: Model<ISubscriber> =
|
|
mongoose.models.Subscriber || mongoose.model<ISubscriber>('Subscriber', SubscriberSchema)
|
|
|
|
export default Subscriber
|