From 69bff6c114c9505e43e467a40db899b6dbf64214 Mon Sep 17 00:00:00 2001 From: tholulomo Date: Tue, 6 Jun 2023 17:29:57 -0400 Subject: [PATCH] feat(#391): Add status enumerated import --- resfulservice/src/models/datasetId.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resfulservice/src/models/datasetId.js b/resfulservice/src/models/datasetId.js index 1fbe9ecc..35fb0a9b 100644 --- a/resfulservice/src/models/datasetId.js +++ b/resfulservice/src/models/datasetId.js @@ -1,4 +1,5 @@ const mongoose = require('mongoose'); +const { DatasetStatusOpt, DatasetStatusDefault } = require('../../config/constant'); const Schema = mongoose.Schema; const datasetIdSchema = new Schema({ @@ -9,8 +10,8 @@ const datasetIdSchema = new Schema({ }, status: { type: String, - enum: ['APPROVED', 'UNDER_REVIEW', 'WORK_IN_PROGRESS'], - default: 'WORK_IN_PROGRESS' + enum: DatasetStatusOpt, + default: DatasetStatusDefault }, samples: [{ type: Schema.Types.ObjectId,