mirror of
https://github.com/hexastack/hexabot
synced 2024-11-23 01:55:15 +00:00
Merge pull request #277 from Hexastack/276-bug-unable-to-submit-attachment-block-edit-form
fix(api): schema support attachment_id nullable value
This commit is contained in:
commit
807af97aaf
@ -53,6 +53,7 @@ export class BlockRepository extends BaseRepository<
|
||||
if (
|
||||
block.message &&
|
||||
'attachment' in block.message &&
|
||||
block.message.attachment.payload &&
|
||||
'url' in block.message.attachment.payload
|
||||
) {
|
||||
this.logger.error(
|
||||
|
@ -409,6 +409,7 @@ export class BlockService extends BaseService<Block, BlockPopulate, BlockFull> {
|
||||
if (
|
||||
block.message &&
|
||||
'attachment' in block.message &&
|
||||
block.message.attachment.payload &&
|
||||
'url' in block.message.attachment.payload
|
||||
) {
|
||||
this.logger.error(
|
||||
|
@ -71,7 +71,7 @@ export function isValidMessage(msg: any) {
|
||||
.required(),
|
||||
payload: Joi.object().keys({
|
||||
url: Joi.string().uri(),
|
||||
attachment_id: Joi.string(),
|
||||
attachment_id: Joi.string().allow(null),
|
||||
}),
|
||||
}),
|
||||
elements: Joi.boolean(),
|
||||
|
Loading…
Reference in New Issue
Block a user