mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-05 07:59:30 -05:00
Got rid of category objects and changed to just the number.
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
/**
|
||||
* Mongoose schema for storing metrics from Google Lighthouse.
|
||||
* @typedef {Object} MetricsSchema
|
||||
* @property {mongoose.Schema.Types.ObjectId} monitorId - Reference to the Monitor model.
|
||||
* @property {Object} accessibility - Metrics related to accessibility category.
|
||||
* @property {Object} bestPractices - Metrics related to best practices category.
|
||||
* @property {Object} seo - Metrics related to SEO category.
|
||||
* @property {Object} performance - Metrics related to performance category.
|
||||
*/
|
||||
|
||||
const MetricsSchema = mongoose.Schema(
|
||||
{
|
||||
monitorId: {
|
||||
@@ -18,19 +8,19 @@ const MetricsSchema = mongoose.Schema(
|
||||
immutable: true,
|
||||
},
|
||||
accessibility: {
|
||||
type: Object,
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
bestPractices: {
|
||||
type: Object,
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
seo: {
|
||||
type: Object,
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
performance: {
|
||||
type: Object,
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
@@ -39,9 +29,4 @@ const MetricsSchema = mongoose.Schema(
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Mongoose model for storing metrics from Google Lighthouse.
|
||||
* @typedef {mongoose.Model<MetricsSchema>} LighthouseMetricsModel
|
||||
*/
|
||||
|
||||
module.exports = mongoose.model("LighthouseMetrics", MetricsSchema);
|
||||
|
||||
Reference in New Issue
Block a user