Skip to content

Commit

Permalink
Merge pull request #31 from meiling-gatekeeper/staging
Browse files Browse the repository at this point in the history
Ver. 0.8.3
  • Loading branch information
Alex4386 authored Feb 12, 2022
2 parents 25a3944 + a7887fc commit e3eb97f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meiling",
"version": "0.8.1",
"version": "0.8.3",
"description": "An easy-to-use, open-source, flexible oAuth2 Authentication Provider and OpenID Connect Server",
"main": "dist/",
"repository": "https://github.com/meiling-gatekeeper/meiling",
Expand Down
5 changes: 4 additions & 1 deletion src/routes/v1/admin/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ const usersAdminHandler = (app: FastifyInstance, opts: FastifyPluginOptions, don
// TODO: add endpoints to allow CRUD operations on user's authentication method by admin

const data = req.body as any;
const hasRequirementsMet = Utils.isNotBlank(data, data.username);
if (!data)
return Meiling.V1.Error.sendMeilingError(rep, Meiling.V1.Error.ErrorType.INVALID_REQUEST, 'Invalid Body');

const hasRequirementsMet = Utils.isNotBlank(data.username);

if (!hasRequirementsMet)
return Meiling.V1.Error.sendMeilingError(rep, Meiling.V1.Error.ErrorType.INVALID_REQUEST, 'Invalid Username');
Expand Down

0 comments on commit e3eb97f

Please sign in to comment.