We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fce316 + 38f6b8e commit 2a8f3a5Copy full SHA for 2a8f3a5
src/routes/api/oba/alerts/+server.js
@@ -9,6 +9,7 @@ export async function GET() {
9
'alerts.pb',
10
PRIVATE_OBACO_SHOW_TEST_ALERTS && PRIVATE_OBACO_SHOW_TEST_ALERTS == 'true' ? { test: 1 } : {}
11
);
12
+
13
const response = await fetch(alertsURL);
14
15
const buffer = await response.arrayBuffer();
@@ -17,6 +18,11 @@ export async function GET() {
17
18
19
let validAlert = null;
20
for (const entity of feed.entity) {
21
+ // If we're in test mode, show the alert to test the UI
22
+ if (PRIVATE_OBACO_SHOW_TEST_ALERTS) {
23
+ validAlert = entity.alert;
24
+ break;
25
+ }
26
if (entity.alert && isValidAlert(entity.alert)) {
27
validAlert = entity.alert;
28
break;
0 commit comments