V1 Importer work

This commit is contained in:
Jamie Curnow
2018-08-21 14:10:38 +10:00
parent 8d925deeb0
commit c7260bcb9f
17 changed files with 433 additions and 92 deletions

View File

@ -98,7 +98,7 @@ module.exports = {
data = data || {};
data.expiry = data.expiry || '30d';
if (access && access.token.get('attrs').id) {
if (access && access.token.getUserId(0)) {
// Create a moment of the expiry expression
let expiry = helpers.parseDatePeriod(data.expiry);
@ -107,7 +107,7 @@ module.exports = {
}
let token_attrs = {
id: access.token.get('attrs').id
id: access.token.getUserId(0)
};
// Only admins can request otherwise scoped tokens