Skip to content

Commit

Permalink
#496 Introduce DSU versioning in products and batches + fix in trustl…
Browse files Browse the repository at this point in the history
…oader
  • Loading branch information
adrian.ganga committed Jan 24, 2022
1 parent b5b3355 commit 8f9f51e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions epi-utils/lib/mappings/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ async function processBatchMessage(message) {
delete this.batch.recalledSerialNumbers;
delete this.batch.decommissionedSerialNumbers;

this.batch.epiProtocol = utils.constants.EPI_PROTOCOL_VERSION;

await this.saveJSONS(batchDSU, indication);


Expand Down
2 changes: 2 additions & 0 deletions epi-utils/lib/mappings/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ async function processProductMessage(message) {
}
utils.transformFromMessage(this.product, message.product, utils.productDataSourceMapping);
this.product.version = version;
this.product.epiProtocol = constants.EPI_PROTOCOL_VERSION;

await this.saveJSONS(productDSU, indication);

if (!alreadyExists) {
Expand Down
1 change: 1 addition & 0 deletions epi-utils/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ constants = {
'SERIAL_NUMBERS_LOGS_TABLE': "serial_numbers_logs",
'PRODUCT_KEYSSI_STORAGE_TABLE': "productKeySSIs",
'BATCHES_STORAGE_TABLE': "batches",
'EPI_PROTOCOL_VERSION':"1.0",
'PRODUCT_DSU_MOUNT_POINT': "/product",
'BATCH_DSU_MOUNT_POINT': "/batch",
'BATCH_STORAGE_FILE': "/batch.json",
Expand Down

0 comments on commit 8f9f51e

Please sign in to comment.