Corresponds to DELETE request with a resource identifier, deleting a single document from the database

async def delete(self, *args, **kwargs):
        '''
        Corresponds to DELETE request with a resource identifier, deleting a single document from the database
        '''
        pk = self.pk_type(kwargs['pk'])
        result = await self._meta.object_class.delete_entries(db=self.db, query={self.pk: pk})
        if result.acknowledged:
            if result.deleted_count == 0:
                raise NotFound()
        else:
            raise BadRequest('Failed to delete object')