Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit d75befa

Browse files
committed
Add call to validate in NotificationsTest for testing
1 parent 8bbb1e3 commit d75befa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ApiService/ApiService/Functions/NotificationsTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ public async Async.Task<HttpResponseData> Run([HttpTrigger(AuthorizationLevel.An
2424
}
2525

2626
var notificationTest = request.OkV;
27+
var validConfig = await notificationTest.Notification.Config.Validate();
28+
if (!validConfig.IsOk) {
29+
return await _context.RequestHandling.NotOk(req, validConfig.ErrorV, context: "notification create");
30+
}
31+
2732
var result = await _context.NotificationOperations.TriggerNotification(notificationTest.Notification.Container, notificationTest.Notification,
2833
notificationTest.Report, isLastRetryAttempt: true);
2934
var response = req.CreateResponse(HttpStatusCode.OK);

0 commit comments

Comments
 (0)