Skip to content

Commit

Permalink
Merge pull request #540 from Badsender-com/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
medamineziraoui authored Nov 25, 2021
2 parents 34ee9cc + 08bd77b commit 7ee4e2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/server/group/group.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const GroupSchema = Schema(
// from mongoose doc:
// violating the constraint returns an E11000 error from MongoDB when saving, not a Mongoose validation error.
unique: true,
set: normalizeString,
set: trimString,
},
status: {
type: String,
Expand Down
4 changes: 2 additions & 2 deletions packages/server/template/template.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Schema } = require('mongoose');
const { ObjectId } = Schema.Types;
const mongooseHidden = require('mongoose-hidden')();

const { normalizeString } = require('../utils/model');
const { trimString } = require('../utils/model');
const { GroupModel } = require('../constant/model.names');

/**
Expand Down Expand Up @@ -43,7 +43,7 @@ const TemplateSchema = Schema(
type: String,
unique: true,
required: [true, 'name is required'],
set: normalizeString,
set: trimString,
},
description: {
type: String,
Expand Down

0 comments on commit 7ee4e2d

Please sign in to comment.