Skip to content

Commit 4028b4b

Browse files
committed
chnages on core web vitals report added
1 parent 10d952d commit 4028b4b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

functions/cwvtech/libs/queries.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,19 @@
66
DB = firestore.Client(project=os.environ.get('PROJECT'))
77

88
def list_data(params):
9-
ref = DB.collection(u'technologies')
9+
ref = DB.collection(u'core_web_vitals')
1010

1111
query = ref
1212
print("params", params)
1313
if 'start' in params:
1414
query = query.where('date', '>=', params['start'])
1515
if 'end' in params:
1616
query = query.where('date', '<=', params['end'])
17-
if 'category' in params:
18-
query = query.where('category', '==', params['category'])
1917
if 'geo' in params:
2018
query = query.where('geo', '==', params['geo'])
21-
if 'app' in params:
19+
if 'technology' in params:
2220
params_array = json.loads(params['app'])
23-
query = query.where('app', 'in', params_array)
24-
if 'client' in params:
25-
query = query.where('client', '==', params['client'])
21+
query = query.where('technology', 'in', params_array)
2622
if 'rank' in params:
2723
query = query.where('rank', '==', params['rank'])
2824

functions/cwvtech/libs/validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def __init__(self, params):
99
def validate(self):
1010
result = Result(status="ok", result="()")
1111

12-
if 'geo' not in self.params:
13-
self.add_error("geo", "missing geo parameters")
12+
# if 'geo' not in self.params:
13+
# self.add_error("geo", "missing geo parameters")
1414

1515
return Result(errors=self.errors, result=self.params)
1616

0 commit comments

Comments
 (0)