mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Add created field to trial requests
Necessary for importing external trial requests.
This commit is contained in:
parent
2fecaf9618
commit
804c62e13b
2 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ TrialRequestSchema = c.object {
|
|||
|
||||
_.extend TrialRequestSchema.properties,
|
||||
applicant: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
|
||||
created: c.date({readOnly: true})
|
||||
prepaidCode: c.objectId()
|
||||
reviewDate: c.date({readOnly: true})
|
||||
reviewer: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
|
||||
|
|
|
@ -19,6 +19,7 @@ TrialRequestHandler = class TrialRequestHandler extends Handler
|
|||
makeNewInstance: (req) ->
|
||||
instance = super(req)
|
||||
instance.set 'applicant', req.user._id
|
||||
instance.set 'created', new Date()
|
||||
instance.set 'status', 'submitted'
|
||||
instance
|
||||
|
||||
|
|
Loading…
Reference in a new issue