mirror of
https://github.com/plankanban/planka.git
synced 2025-12-16 09:13:18 +03:00
19 lines
291 B
JavaScript
Executable File
19 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);
|
|
},
|
|
};
|