Skip to content

Commit

Permalink
fix: WppConnect-server version on start close #354
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Aug 8, 2022
1 parent 46cc839 commit 26179b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controller/sessionController.js
Expand Up @@ -19,6 +19,7 @@ import CreateSessionUtil from '../util/createSessionUtil';
import getAllTokens from '../util/getAllTokens';
import fs from 'fs';
import mime from 'mime-types';
import { version } from '../../package.json';

const SessionUtil = new CreateSessionUtil();

Expand Down Expand Up @@ -278,6 +279,7 @@ export async function getSessionState(req, res) {
status: client.status,
qrcode: client.qrcode,
urlcode: client.urlcode,
version: version,
});
} catch (ex) {
req.logger.error(ex);
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Expand Up @@ -27,6 +27,7 @@ import config from './config.json';
import boolParser from 'express-query-boolean';
import mergeDeep from 'merge-deep';
import { convert } from './mapper/index';
import { version } from '../package.json';

export function initServer(serverOptions) {
if (typeof serverOptions !== 'object') {
Expand Down Expand Up @@ -93,6 +94,7 @@ export function initServer(serverOptions) {
http.listen(PORT, () => {
logger.info(`Server is running on port: ${PORT}`);
logger.info(`\x1b[31m Visit ${serverOptions.host}:${PORT}/api-docs for Swagger docs`);
logger.info(`WPPConnect-Server version: ${version}`);

if (serverOptions.startAllSession) startAllSessions(serverOptions, logger);
});
Expand Down

0 comments on commit 26179b8

Please sign in to comment.