mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
18 lines
291 B
JavaScript
Executable file
18 lines
291 B
JavaScript
Executable file
const jwt = require('jsonwebtoken');
|
|
|
|
module.exports = {
|
|
sync: true,
|
|
|
|
inputs: {
|
|
payload: {
|
|
type: 'json',
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
fn(inputs, exits) {
|
|
const token = jwt.sign(inputs.payload, sails.config.session.secret);
|
|
|
|
return exits.success(token);
|
|
},
|
|
};
|