File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -115,13 +115,13 @@ The following snippets are all taken from the _app.js_ file.
115
115
- Select the "Tasks" database.
116
116
117
117
``` javascript
118
- const database = await client .databases (databaseId);
118
+ const database = client .database (databaseId);
119
119
```
120
120
121
121
- Select the "Items" container/collection.
122
122
123
123
``` javascript
124
- const container = await database .container (containerId);
124
+ const container = database .container (containerId);
125
125
```
126
126
127
127
- Select all the items in the "Items" container.
@@ -132,7 +132,7 @@ The following snippets are all taken from the _app.js_ file.
132
132
query: " SELECT * from c"
133
133
};
134
134
135
- const { resources: results } = await container .items
135
+ const { resources: items } = await container .items
136
136
.query (querySpec)
137
137
.fetchAll ();
138
138
```
@@ -149,15 +149,15 @@ The following snippets are all taken from the _app.js_ file.
149
149
const { id , category } = createdItem;
150
150
151
151
createdItem .isComplete = true ;
152
- const { resource: itemToUpdate } = await container
152
+ const { resource: updatedItem } = await container
153
153
.item (id, category)
154
- .replace (itemToUpdate );
154
+ .replace (createdItem );
155
155
```
156
156
157
157
- Delete an item
158
158
159
159
``` javascript
160
- const { resource: result } = await this . container .item (id, category).delete ();
160
+ const { resource: result } = await container .item (id, category).delete ();
161
161
```
162
162
163
163
> [ !NOTE]
You can’t perform that action at this time.
0 commit comments