Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Change scopes type in access token, API key
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Sep 3, 2020
1 parent 8fb6ad4 commit 14f3182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/controllers/groups/_id/api-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class GroupApiKeysController {
@Middleware(
validator(
{
scopes: Joi.string(),
scopes: Joi.array().items(Joi.string()),
ipRestrictions: Joi.string(),
referrerRestrictions: Joi.string(),
name: Joi.string(),
Expand Down Expand Up @@ -78,7 +78,7 @@ export class GroupApiKeysController {
@Middleware(
validator(
{
scopes: Joi.string().allow(null),
scopes: Joi.array().items(Joi.string()).allow(null),
ipRestrictions: Joi.string().allow(null),
referrerRestrictions: Joi.string().allow(null),
name: Joi.string().allow(null),
Expand Down
6 changes: 2 additions & 4 deletions src/controllers/users/_id/access-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ export class UserAccessTokensController {
@Middleware(
validator(
{
scopes: Joi.string(),
scopes: Joi.array().items(Joi.string()),
name: Joi.string(),
description: Joi.string(),
expiresAt: Joi.string(),
},
"body"
)
Expand Down Expand Up @@ -90,10 +89,9 @@ export class UserAccessTokensController {
@Middleware(
validator(
{
scopes: Joi.string().allow(null),
scopes: Joi.array().items(Joi.string()).allow(null),
name: Joi.string().allow(null),
description: Joi.string().allow(null),
expiresAt: Joi.string(),
},
"body"
)
Expand Down

0 comments on commit 14f3182

Please sign in to comment.