add userId and teamId to status pages

This commit is contained in:
Alex Holliday committed 2025-02-10 10:20:21 -08:00
1 parent deca3b93f0
commit 99079cc2bb
2 files changed
+14

No files matched your search

+12
View File
@@ -2,6 +2,18 @@ import mongoose from "mongoose";
const StatusPageSchema = mongoose.Schema(
{
userId: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
immutable: true,
required: true,
},
teamId: {
type: mongoose.Schema.Types.ObjectId,
ref: "Team",
immutable: true,
required: true,
},
companyName: {
type: String,
required: true,
+2
View File
@@ -419,6 +419,8 @@ const getStatusPageParamValidation = joi.object({
});
const createStatusPageBodyValidation = joi.object({
userId: joi.string().required(),
teamId: joi.string().required(),
companyName: joi.string().required(),
url: joi.string().required(),
timezone: joi.string().optional(),