Skip to content

Commit

Permalink
ANGOLASUP-931: Saving the entire reponse to local database
Browse files Browse the repository at this point in the history
  • Loading branch information
saleksandra committed Oct 11, 2024
1 parent ce3288e commit b2b205c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/openlmis-cached-repository/openlmis-cached-resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@
throw error;
})
.then(function(doc) {
database.put({
id: doc._id,
_rev: doc._rev,
object: doc
});
database.put(doc);
return response.content;
})
.catch(function(error) {
Expand Down Expand Up @@ -352,11 +348,7 @@
database.putVersioned(response.content);
return response.content;
}

database.put({
id: response.content.id,
object: response.content
});
database.put(response.content);
return response.content;
})
.catch(function(error) {
Expand Down

0 comments on commit b2b205c

Please sign in to comment.