Skip to content

Commit

Permalink
fix eTag handling in UI, replacing "weak" on GET for all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeckle committed Apr 9, 2024
1 parent 3ce07e7 commit 6a46766
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/modules/things/attributes.ts
Expand Up @@ -170,7 +170,7 @@ function onEditToggle(event) {
API.callDittoREST('GET', `/things/${Things.theThing.thingId}/attributes/${dom.crudAttribute.idValue}`,
null, null, true)
.then((response) => {
eTag = response.headers.get('ETag');
eTag = response.headers.get('ETag').replace('W/', '');
return response.json();
})
.then((attributeValue) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/modules/things/features.ts
Expand Up @@ -243,7 +243,7 @@ function onEditToggle(event) {
if (isEditing && dom.crudFeature.idValue && dom.crudFeature.idValue !== '') {
API.callDittoREST('GET', `/things/${Things.theThing.thingId}/features/${dom.crudFeature.idValue}`, null, null, true)
.then((response) => {
eTag = response.headers.get('ETag');
eTag = response.headers.get('ETag').replace('W/', '');
return response.json();
})
.then((featureJson) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/modules/things/thingsCRUD.ts
Expand Up @@ -160,7 +160,7 @@ function onEditToggle(event) {
if (isEditing && Things.theThing) {
API.callDittoREST('GET', `/things/${Things.theThing.thingId}`, null, null, true)
.then((response) => {
eTag = response.headers.get('ETag');
eTag = response.headers.get('ETag').replace('W/', '');
return response.json();
})
.then((thingJson) => {
Expand Down

0 comments on commit 6a46766

Please sign in to comment.