def Firm(): 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" Name = Wildify(bottle.request.forms.get("Name")) PostCode = Wildify(bottle.request.forms.get("PostCode")) Language = bottle.request.forms.get("Language") return (DBController.QueryFirm(Name, PostCode, Language, State)) return ({ "error": "Sorry you are not authorised to access this data. Please try a page refresh" })