def update_message(request, id): message = Message.objects.filter(id=id).first() or abort(404) return message.update(request.data).save()
def destroy_message(request, id): message = Message.objects.filter(id=id).first() or abort(404) message.delete() return message
def get_message(request, id): return Message.objects.filter(id=id).first() or abort(404)