def put(self, uuid: str, resource_uuid: str):
     MessageService.add_resource_to_message(uuid,
                                            resource_uuid=resource_uuid,
                                            uow=current_app.context)
     return {
         "message":
         f"resource {resource_uuid} successfully added from message {uuid}"
     }, 201
    def put(self, uuid: str):
        parser = reqparse.RequestParser()
        parser.add_argument('resource_ids',
                            type=str,
                            help='Resource ids',
                            action='append',
                            required=True)
        args = parser.parse_args()

        resource_ids: Union[str, List[str]] = args.get("resource_ids")
        if isinstance(resource_ids, str):
            resource_ids = [resource_ids]

        for resource_uuid in resource_ids:
            MessageService.add_resource_to_message(uuid,
                                                   resource_uuid=resource_uuid,
                                                   uow=current_app.context)

        return {
            "message":
            f"resources {resource_ids} successfully added from message {uuid}"
        }, 201