Skip to content

Commit 270bdf4

Browse files
committed
Add missing SubscribeToNotifications method to lab 09
1 parent b59b614 commit 270bdf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/09-progressive-web-app.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ async Task RequestNotificationSubscriptionAsync()
143143
Also add the `SubscribeToNotifications` method to `OrdersClient`.
144144

145145
```csharp
146-
146+
public async Task SubscribeToNotifications(NotificationSubscription subscription)
147+
{
148+
var response = await httpClient.PostAsJsonAsync("notifications/subscribe", subscription);
149+
response.EnsureSuccessStatusCode();
150+
}
147151
```
148152

149153
You'll also need to inject the `IJSRuntime` service into the `Checkout` component.

0 commit comments

Comments
 (0)