From f6bcc94bf8d9fa0ebecfaea540baef5a60c94789 Mon Sep 17 00:00:00 2001
From: Matt Lott <mattlott@live.com>
Date: Fri, 6 Feb 2015 09:47:06 -0800
Subject: [PATCH] Fix oneTimes email schema
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Changing ‘targetEmail’ field to ‘email’.
---
 app/schemas/models/user.coffee | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee
index a499decdd..01b0765d9 100644
--- a/app/schemas/models/user.coffee
+++ b/app/schemas/models/user.coffee
@@ -86,9 +86,9 @@ _.extend UserSchema.properties,
     employerNotes: {$ref: '#/definitions/emailSubscription'}
 
     oneTimes: c.array {title: 'One-time emails'},
-      c.object {title: 'One-time email', required: ['type', 'targetEmail']},
+      c.object {title: 'One-time email', required: ['type', 'email']},
         type: c.shortString() # E.g 'subscribe modal parent'
-        targetEmail: c.shortString()
+        email: c.shortString()
         sent: c.date() # Set when sent
 
   # server controlled