Skip to content

Commit 17c49c5

Browse files
committed
add support for falcon 4
1 parent 030f5d0 commit 17c49c5

55 files changed

Lines changed: 107 additions & 75 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/oncall/api/v0/audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ def on_get(req, resp):
8686
results = cursor.fetchall()
8787
cursor.close()
8888
connection.close()
89-
resp.body = json_dumps(results)
89+
resp.text = json_dumps(results)

src/oncall/api/v0/bonus_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def on_get(self, req, resp):
114114

115115
oncall_bonus_teams = bonus_response.json()
116116

117-
for event in json.loads(resp.body):
117+
for event in json.loads(resp.text):
118118
if event['role'].lower() == 'manager':
119119
continue
120120

@@ -133,4 +133,4 @@ def on_get(self, req, resp):
133133
ldap_grouping[event['user']].append(event)
134134

135135
resp.status = HTTP_200
136-
resp.body = json_dumps(ldap_grouping)
136+
resp.text = json_dumps(ldap_grouping)

src/oncall/api/v0/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def on_get(req, resp, event_id):
7373
connection.close()
7474
if num_found == 0:
7575
raise HTTPNotFound()
76-
resp.body = json_dumps(data)
76+
resp.text = json_dumps(data)
7777

7878

7979
@login_required

src/oncall/api/v0/event_override.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def on_post(req, resp):
189189
[user_id, events[0]['user_id']], cursor, start_time=start, end_time=end)
190190
create_audit({'new_events': ret_data, 'request_body': data}, ret_data[0]['team'],
191191
EVENT_SUBSTITUTED, req, cursor)
192-
resp.body = json_dumps(ret_data)
192+
resp.text = json_dumps(ret_data)
193193
except HTTPError:
194194
raise
195195
else:

src/oncall/api/v0/events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def on_get(req, resp):
202202
data = cursor.fetchall()
203203
cursor.close()
204204
connection.close()
205-
resp.body = json_dumps(data)
205+
resp.text = json_dumps(data)
206206

207207

208208
@login_required
@@ -315,4 +315,4 @@ def on_post(req, resp):
315315
connection.close()
316316

317317
resp.status = HTTP_201
318-
resp.body = json_dumps(event_id)
318+
resp.text = json_dumps(event_id)

src/oncall/api/v0/events_link.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ def on_post(req, resp):
139139
connection.close()
140140

141141
resp.status = HTTP_201
142-
resp.body = json_dumps({'link_id': link_id, 'event_ids': ev_ids})
142+
resp.text = json_dumps({'link_id': link_id, 'event_ids': ev_ids})

src/oncall/api/v0/ical_key_detail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def on_get(req, resp, key):
2121
if not results:
2222
raise HTTPNotFound()
2323

24-
resp.body = json_dumps(results)
24+
resp.text = json_dumps(results)
2525
resp.set_header('Content-Type', 'application/json')
2626

2727

src/oncall/api/v0/ical_key_requester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def on_get(req, resp, requester):
2424
if not results:
2525
raise HTTPNotFound()
2626

27-
resp.body = json_dumps(results)
27+
resp.text = json_dumps(results)
2828
resp.set_header('Content-Type', 'application/json')
2929

3030

src/oncall/api/v0/ical_key_team.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def on_get(req, resp, team):
3434
if key is None:
3535
raise HTTPNotFound()
3636

37-
resp.body = key
37+
resp.text = key
3838
resp.set_header('Content-Type', 'text/plain')
3939

4040

@@ -55,7 +55,7 @@ def on_post(req, resp, team):
5555
update_ical_key(challenger, team, 'team', key)
5656

5757
resp.status = HTTP_201
58-
resp.body = key
58+
resp.text = key
5959
resp.set_header('Content-Type', 'text/plain')
6060

6161

src/oncall/api/v0/ical_key_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def on_get(req, resp, user_name):
3636
if key is None:
3737
raise HTTPNotFound()
3838

39-
resp.body = key
39+
resp.text = key
4040
resp.set_header('Content-Type', 'text/plain')
4141

4242

@@ -62,7 +62,7 @@ def on_post(req, resp, user_name):
6262
update_ical_key(challenger, user_name, 'user', key)
6363

6464
resp.status = HTTP_201
65-
resp.body = key
65+
resp.text = key
6666
resp.set_header('Content-Type', 'text/plain')
6767

6868

0 commit comments

Comments
 (0)