Skip to content

Commit

Permalink
Merge pull request #697 from pennlabs/pca-quick-fix
Browse files Browse the repository at this point in the history
Return 200 to webhook request
  • Loading branch information
el-agua authored Jan 17, 2025
2 parents 5c6f189 + 94c0ae5 commit cb694bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/alert/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def accept_webhook(request):
"""Your credentials cannot be verified.
They should be placed in the header as "Authorization-Bearer",
YOUR_APP_ID and "Authorization-Token" , YOUR_TOKEN""",
status=401,
status=200,
)

if request.method != "POST":
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/alert/test_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def test_wrong_password(self, mock_alert):
content_type="application/json",
**self.headers,
)
self.assertEqual(401, res.status_code)
self.assertEqual(200, res.status_code)
self.assertFalse(mock_alert.called)
self.assertEqual(0, StatusUpdate.objects.count())

Expand All @@ -926,7 +926,7 @@ def test_wrong_user(self, mock_alert):
content_type="application/json",
**self.headers,
)
self.assertEqual(401, res.status_code)
self.assertEqual(200, res.status_code)
self.assertFalse(mock_alert.called)
self.assertEqual(0, StatusUpdate.objects.count())

Expand Down
2 changes: 1 addition & 1 deletion k8s/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class MyChart extends PennLabsChart {
})

new CronJob(this, 'sync-path-course-statuses', {
schedule: cronTime.every(30).minutes(),
schedule: cronTime.every(5).minutes(),
image: backendImage,
secret,
cmd: ['python', 'manage.py', 'sync_path_status', '--slack'],
Expand Down

0 comments on commit cb694bf

Please sign in to comment.