def content(uid): password = bottle.request.forms.get("password") content = db.get_content(uid, password) if smells_encrypted(content): bottle.response.status = 403 return "Nope, try again" return content
def decrypt(): password = bottle.request.forms.get("password") uid = bottle.request.forms.get("uid") return db.get_content(uid, password)