Skip to content

Commit 7fb12bb

Browse files
Merge pull request #259340 from williamzhao87/patch-1
Update matching-concepts.md
2 parents 08fe19b + 0c9ae2a commit 7fb12bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/communication-services/concepts/router/matching-concepts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var worker = await client.CreateWorkerAsync(new CreateWorkerOptions(workerId: "w
5555
::: zone pivot="programming-language-javascript"
5656

5757
```typescript
58-
const worker = await client.path("/routing/workers/{workerId}", "worker-1").patch({
58+
let worker = await client.path("/routing/workers/{workerId}", "worker-1").patch({
5959
body: {
6060
availableForOffers: true,
6161
capacity: 2,
@@ -235,15 +235,15 @@ If a worker would like to stop receiving offers, it can be deregistered by setti
235235

236236
```csharp
237237
worker.AvailableForOffers = false;
238-
await client.UpdateWorkerAsync(worker);
238+
worker = await client.UpdateWorkerAsync(worker);
239239
```
240240

241241
::: zone-end
242242

243243
::: zone pivot="programming-language-javascript"
244244

245245
```typescript
246-
await client.path("/routing/workers/{workerId}", "worker-1").patch({
246+
worker = await client.path("/routing/workers/{workerId}", worker.body.id).patch({
247247
body: { availableForOffers: false },
248248
contentType: "application/merge-patch+json"
249249
});
@@ -254,15 +254,15 @@ await client.path("/routing/workers/{workerId}", "worker-1").patch({
254254
::: zone pivot="programming-language-python"
255255

256256
```python
257-
client.upsert_worker(worker_id = "worker-1", available_for_offers = False)
257+
worker = client.upsert_worker(worker_id = worker.id, available_for_offers = False)
258258
```
259259

260260
::: zone-end
261261

262262
::: zone pivot="programming-language-java"
263263

264264
```java
265-
client.updateWorkerWithResponse("worker-1", worker.setAvailableForOffers(false));
265+
worker = client.updateWorkerWithResponse(worker.getId(), worker.setAvailableForOffers(false));
266266
```
267267

268268
::: zone-end

0 commit comments

Comments
 (0)