Skip to content

Commit

Permalink
feat: make version available on admin endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Jun 22, 2021
1 parent 48f2eb7 commit 1d9f169
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/routes/v1/admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Utils } from '../../../common';
import { getTokenFromRequest } from '../../../common/token';
import { NodeEnvironment } from '../../../interface';
import config from '../../../resources/config';
import { info as packageJson } from '../../../resources/package';
import { sendMeilingError } from '../meiling/error';
import { MeilingV1ErrorType } from '../meiling/interfaces';
import appsAdminHandler from './apps';
Expand Down Expand Up @@ -74,6 +75,12 @@ const adminV1Plugin = (app: FastifyInstance, opts: FastifyPluginOptions, done: (
version: 1,
engine: 'Meiling Project',
api: 'Scarlet Mansion Access Control Admin',
about: {
name: packageJson.name,
description: packageJson.description,
repository: packageJson.repository,
version: packageJson.version,
},
});
});

Expand Down

0 comments on commit 1d9f169

Please sign in to comment.