injected service use to handle the attachment related operations
injected logger used to handle the logging
request context [headers, body, params, query]. Note:
params.topicId
is requiredparams.attachmentId
is required200 Status OK
This validator will check if attachment belongs to the topic by applying the following steps in sequence:
Get topicId and attachmentId from context
Check if topicId or attachmentId exists in context
Get attachment and check if type equals to topic and ownerId equals topicId from context (attachmentService.getOneAttachment)
400 NBError Bad Request
404 NBError Not Found
Generated using TypeDoc
Does the attachment belong to the topic validator