Add settings API for managing active Oscar year
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
7c20a2b2ae
commit
64cfdc3c6d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user