diff --git a/models/comment.js b/models/comment.js index a2733f551..42b7425b9 100644 --- a/models/comment.js +++ b/models/comment.js @@ -9,11 +9,6 @@ const STATUSES = [ null ]; -const TAGS = [ - 'STAFF', - null -]; - /** * The Mongo schema for a Comment Status. * @type {Schema} @@ -54,10 +49,11 @@ const CommentSchema = new Schema({ author_id: String, status_history: [StatusSchema], status: {type: String, default: null}, - tag: { - type: String, - enum: TAGS, - }, + tags: [{ + name: String, + assigned_by: String, + created_at: Date + }], parent_id: String }, { timestamps: { diff --git a/services/comments.js b/services/comments.js index 9055afcfa..bca56a2db 100644 --- a/services/comments.js +++ b/services/comments.js @@ -36,7 +36,13 @@ module.exports = class CommentsService { created_at: new Date() }] : [], status, - tag: UsersService.isStaff(author_id) ? 'STAFF' : null, + tags: [ + { + name: UsersService.isStaff(author_id) ? 'STAFF' : null, + assigned_by: null, + created_at: new Date() + } + ], author_id });