Skip to content

Commit 1f0a7d2

Browse files
author
nicola
committed
first attempt for first time user experience
1 parent 58d9c95 commit 1f0a7d2

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎bin/ldnode.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ var argv = require('nomnom')
102102
full: 'default-app',
103103
help: 'URI to use as a default app for resources (default: https://linkeddata.github.io/warp/#/list/)'
104104
})
105+
.option('signup', {
106+
help: 'Creates a WebID and sets it as owner'
107+
})
105108
.parse();
106109

107110
// Print version and leave

‎lib/identity-provider.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ IdentityProvider.prototype.create = function (options, cert, callback) {
9494
], function (err) {
9595
if (err) {
9696
err.status = 500
97-
debug('Error creating account ' + options.username + ': ' + err.message)
97+
debug('Error creating account ' + options.agent + ': ' + err.message)
9898
}
9999

100-
debug('Created files for ' + options.username)
100+
debug('Created files for ' + options.agent)
101101
callback(err)
102102
})
103103
})
@@ -405,9 +405,9 @@ IdentityProvider.prototype.post = function (req, res, next) {
405405
var self = this
406406
var options = req.body
407407

408-
if (!options || !options.username) {
409-
debug('Account creation is missing username field')
410-
var err = new Error('You must enter an account name!')
408+
if (!options) {
409+
debug('Options missing')
410+
var err = new Error('Settings to create the account have not been passed!')
411411
err.status = 406
412412
return next(err)
413413
}

0 commit comments

Comments
 (0)