示例#1
0
def update_message(account_id, message_id, db, secure=True):
    message = Messages.findOne(db, message_id)
    if message:
    	message.update(request.json)
        response.status = 204
    else:
        response.status = 404
示例#2
0
def get_message(account_id, message_id, db, secure=True):
    message = Messages.findOne(db, message_id)
    if message:
        return message.JSON()
    else:
        response.status = 404
        return {}