Exemple #1
0
def Lawyer():
    if bottle.request.get_cookie("access"):
        State = DBController.CheckCookie(
            uuid.UUID(hex=bottle.request.get_cookie("access")))
        if State:
            bottle.response.headers["Content-Type"] = "application/json"
            FirstName = Wildify(bottle.request.forms.get("FirstName"))
            LastName = Wildify(bottle.request.forms.get("LastName"))
            PostCode = Wildify(bottle.request.forms.get("PostCode"))
            Specialty = Wildify(bottle.request.forms.get("Specialty"))
            Language = bottle.request.forms.get("Language")
            return (DBController.QueryLawyer(FirstName, LastName, PostCode,
                                             Language, State))
    return ({
        "error":
        "Sorry you are not authorised to access this data. Please try a page refresh"
    })