hetical-forensic/commands/status/index.js

12 lines
391 B
JavaScript
Raw Normal View History

2019-02-15 17:48:55 +00:00
export const command = 'status';
export const description = 'Check authentication status';
export const action = async ({ req, logger }) => {
if (!global.user.phpsessid) {
logger.error('You are not logged');
} else {
logger.info(`You are logged as ${global.user.firstName} ${global.user.lastName}`);
2019-02-18 22:12:39 +00:00
logger.info(`Cookie: ${global.user.phpsessid}`);
2019-02-15 17:48:55 +00:00
}
};