Skip to content

Commit

Permalink
fix(outh2-apps): Allow to clear display title and description
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Jan 18, 2024
1 parent 99c854b commit f04b115
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/routes-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ const oauthUpdateSchema = {
then: Joi.required(),
otherwise: Joi.optional().valid(false, null)
}),
description: Joi.string().trim().empty('').max(1024).example('My cool app').description('Application description'),
description: Joi.string().trim().allow('').max(1024).example('My cool app').description('Application description'),

title: Joi.string().empty('').trim().max(256).example('App title').description('Title for the application button'),
title: Joi.string().allow('').trim().max(256).example('App title').description('Title for the application button'),

enabled: Joi.boolean().truthy('Y', 'true', '1', 'on').falsy('N', 'false', 0, '').default(false).description('Enable this app'),

Expand Down
4 changes: 2 additions & 2 deletions lib/schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,8 @@ const accountSchemas = {

const oauthCreateSchema = {
name: Joi.string().trim().empty('').max(256).example('My Gmail App').required().description('Application name'),
description: Joi.string().trim().empty('').max(1024).example('My cool app').description('Application description'),
title: Joi.string().empty('').trim().max(256).example('App title').description('Title for the application button'),
description: Joi.string().trim().allow('').max(1024).example('My cool app').description('Application description'),
title: Joi.string().allow('').trim().max(256).example('App title').description('Title for the application button'),

provider: Joi.string()
.trim()
Expand Down
6 changes: 3 additions & 3 deletions workers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -6421,9 +6421,9 @@ When making API calls remember that requests against the same account are queued
}),

payload: Joi.object({
name: Joi.string().trim().empty('').max(256).example('My Gmail App').required().description('Application name'),
description: Joi.string().trim().empty('').max(1024).example('My cool app').description('Application description'),
title: Joi.string().empty('').trim().max(256).example('App title').description('Title for the application button'),
name: Joi.string().trim().empty('').max(256).example('My Gmail App').description('Application name'),
description: Joi.string().trim().allow('').max(1024).example('My cool app').description('Application description'),
title: Joi.string().allow('').trim().max(256).example('App title').description('Title for the application button'),

enabled: Joi.boolean().truthy('Y', 'true', '1', 'on').falsy('N', 'false', 0, '').example(true).description('Enable this app'),

Expand Down

0 comments on commit f04b115

Please sign in to comment.