Skip to content

Commit

Permalink
adding file and changing to isActive
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancisZamora committed Aug 23, 2018
1 parent ded77f1 commit 2ff8afa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions server/api/token.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';
const Boom = require('Boom');
const Joi = require('joi');
const Token = require('../models/token');

const register = function (server,serverOptions) {

server.route({
method:'POST',
path: '/api/tokens',
options: {
auth: {
}
}
});
};

module.exports = {
name: 'api-token',
dependencies: [
'auth',
'hapi-auth-basic',
'hapi-auth-cookie',
'hapi-auth-jwt2',
'hapi-anchor-model',
'hapi-remote-address'
],
register
};
2 changes: 1 addition & 1 deletion server/models/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Token extends AnchorModel {

document = {
description: document.description,
active: true,
isActive: true,
createdAt: new Date(),
key:keyHash.hash,
userId: document.userId,
Expand Down

0 comments on commit 2ff8afa

Please sign in to comment.