Add settings API for managing active Oscar year

Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
Cursor Agent
2025-12-20 22:34:44 +00:00
co-authored by mathieumoran1
parent 7c20a2b2ae
commit 64cfdc3c6d
3 changed files with 98 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
const mongoose = require("mongoose");
// Simple key/value store for global site settings.
// We currently use it for the "active Oscar year" that drives filtering.
const settingSchema = new mongoose.Schema(
{
key: { type: String, required: true, unique: true, index: true },
value: { type: mongoose.Schema.Types.Mixed, required: true },
},
{ timestamps: true }
);
module.exports = mongoose.model("Setting", settingSchema);