def dns_add(request): """ Endpoint to process dns forwarding """ data = _get_data(request) res = util.parse_dns(data) datasrc = util.get_datasrc(res) res = util.process_res(request, res, datasrc) return res
def add(request): """ Endpoint to process a geo-ip request. Input values: { 'lat' : req, 'lng' : req, 'ip' : req, 'bssid' : req, 'ssid' : req, 'uuid' : req, } """ data = _get_data(request) res = {key: data.get(key) for key in constants.REQ_KEYS} res = util.process_res(request, res, constants.HTTP) return res