Allow app.id to be set
This commit is contained in:
parent
a72a42e436
commit
23cf373432
|
@ -100,7 +100,7 @@ var Application = loopback.createModel('Application', ApplicationSchema);
|
|||
Application.beforeCreate = function (next) {
|
||||
var app = this;
|
||||
app.created = app.modified = new Date();
|
||||
app.id = generateKey('id', 'sha1');
|
||||
app.id = app.id || generateKey('id', 'sha1');
|
||||
app.clientKey = generateKey('client');
|
||||
app.javaScriptKey = generateKey('javaScript');
|
||||
app.restApiKey = generateKey('restApi');
|
||||
|
|
Loading…
Reference in New Issue