jitz-sharepoint-utilities 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,7 +199,7 @@ export default class CommonRepository implements ICommonRepository {
|
|
199
199
|
}
|
200
200
|
|
201
201
|
public async updateMetadata(listName: string, item: any): Promise<any> {
|
202
|
-
|
202
|
+
await this.getEntityType(listName).then((entityType) => {
|
203
203
|
item.__metadata = {
|
204
204
|
//etag: "1",
|
205
205
|
type: entityType,
|
@@ -205,7 +205,6 @@ var CommonRepository = /** @class */ (function () {
|
|
205
205
|
return __awaiter(this, void 0, void 0, function () {
|
206
206
|
var url;
|
207
207
|
var _this = this;
|
208
|
-
var item;
|
209
208
|
return __generator(this, function (_a) {
|
210
209
|
switch (_a.label) {
|
211
210
|
case 0: return [4 /*yield*/, this.getEntityType(listName).then(function (entityType) {
|
@@ -233,7 +232,7 @@ var CommonRepository = /** @class */ (function () {
|
|
233
232
|
});
|
234
233
|
})];
|
235
234
|
case 1:
|
236
|
-
|
235
|
+
_a.sent();
|
237
236
|
url = "/_api/web/lists/getbytitle('".concat(listName, "')/items(").concat(item.Id, ")?$select=*,File/Name,File/ServerRelativeUrl&$expand=File");
|
238
237
|
return [2 /*return*/, this.context.client.get(url).then(function (response) {
|
239
238
|
if (response.status >= 200 && response.status <= 300) {
|