From 889458c16475dde04e2b0a37a3de5214e29e5d64 Mon Sep 17 00:00:00 2001 From: Stuiart Stent Date: Sun, 20 Jan 2013 19:18:09 -0500 Subject: [PATCH] fixed validation for exercise creation (inlcuding unique exercise name), also added ability to edit exercises --- data/schemas/exercise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/schemas/exercise.js b/data/schemas/exercise.js index f9bcba4..15424a1 100644 --- a/data/schemas/exercise.js +++ b/data/schemas/exercise.js @@ -7,7 +7,7 @@ var Datafield = new Schema({ var exerciseSchema = new Schema({ - name: String, + name: {type: String, unique: true, required: true}, type: String, description: String, difficulty: Number,