mirror of
https://github.com/hexastack/hexabot
synced 2025-06-04 03:26:22 +00:00
fix(api): missing checks
This commit is contained in:
parent
6b387b826b
commit
99935e116a
@ -53,6 +53,7 @@ export class BlockRepository extends BaseRepository<
|
|||||||
if (
|
if (
|
||||||
block.message &&
|
block.message &&
|
||||||
'attachment' in block.message &&
|
'attachment' in block.message &&
|
||||||
|
block.message.attachment.payload &&
|
||||||
'url' in block.message.attachment.payload
|
'url' in block.message.attachment.payload
|
||||||
) {
|
) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
|
@ -409,6 +409,7 @@ export class BlockService extends BaseService<Block, BlockPopulate, BlockFull> {
|
|||||||
if (
|
if (
|
||||||
block.message &&
|
block.message &&
|
||||||
'attachment' in block.message &&
|
'attachment' in block.message &&
|
||||||
|
block.message.attachment.payload &&
|
||||||
'url' in block.message.attachment.payload
|
'url' in block.message.attachment.payload
|
||||||
) {
|
) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
|
Loading…
Reference in New Issue
Block a user