def store_cache(request): key = request.data.get("key", "unknown") data = request.data.get("value") if request.data.get("append"): if isinstance(data, dict): cached = load(key) or {} cached[data.get("name", "unknown")] = data.get("content") data = cached name = store(key, data, id_generator=str) return Response(name)
def store_cache(request): key = request.data.get("key", "unknown") data = request.data.get('value') if request.data.get('append'): if isinstance(data, dict): cached = load(key) or {} cached[data.get('name', 'unknown')] = data.get('content') data = cached name = store(key, data, id_generator=str) return Response(name)
def transform(request): name = store( "scanreport", dataclasses.asdict(scanreport.gvmd.transform(request.data)), ) return Response(name)