From ab86794c777de836ad81f4eb52fd5e8b7c0b57ab Mon Sep 17 00:00:00 2001 From: Christian Autermann Date: Mon, 3 Feb 2020 11:06:20 +0100 Subject: [PATCH] add rollback script --- insert.js | 8 ++++---- dataPriv_DE.html => privacy_statement_de.html | 0 dataPriv_EN.html => privacy_statement_en.html | 0 rollback.js | 6 ++++++ TOU_DE.html => terms_of_use_de.html | 0 TOU_EN.html => terms_of_use_en.html | 0 6 files changed, 10 insertions(+), 4 deletions(-) rename dataPriv_DE.html => privacy_statement_de.html (100%) rename dataPriv_EN.html => privacy_statement_en.html (100%) create mode 100644 rollback.js rename TOU_DE.html => terms_of_use_de.html (100%) rename TOU_EN.html => terms_of_use_en.html (100%) diff --git a/insert.js b/insert.js index dd55711..37f4557 100644 --- a/insert.js +++ b/insert.js @@ -7,9 +7,9 @@ db.termsOfUse.insert({ _id: new ObjectId(), created: date + "T12:00:00Z", issuedDate: date, - contents: cat("TOU_EN.html").replace(" +", " "), + contents: cat("terms_of_use_en.html").replace(" +", " "), translations: { - de: cat("TOU_DE.html").replace(" +", " ") + de: cat("terms_of_use_de.html").replace(" +", " ") } }); @@ -18,8 +18,8 @@ db.privacyStatements.insert({ _id: new ObjectId(), created: date + "T12:00:00Z", issuedDate: date, - contents: cat("dataPriv_EN.html").replace(" +", " "), + contents: cat("privacy_statement_en.html").replace(" +", " "), translations: { - de: cat("dataPriv_DE.html").replace(" +", " ") + de: cat("privacy_statement_de.html").replace(" +", " ") } }); diff --git a/dataPriv_DE.html b/privacy_statement_de.html similarity index 100% rename from dataPriv_DE.html rename to privacy_statement_de.html diff --git a/dataPriv_EN.html b/privacy_statement_en.html similarity index 100% rename from dataPriv_EN.html rename to privacy_statement_en.html diff --git a/rollback.js b/rollback.js new file mode 100644 index 0000000..439a2bf --- /dev/null +++ b/rollback.js @@ -0,0 +1,6 @@ +//let date = new Date().toISOString().substring(0, 10); + +let date = '2019-07-14'; + +db.termsOfUse.remove({issuedDate: date}); +db.privacyStatements.remove({issuedDate: date}); diff --git a/TOU_DE.html b/terms_of_use_de.html similarity index 100% rename from TOU_DE.html rename to terms_of_use_de.html diff --git a/TOU_EN.html b/terms_of_use_en.html similarity index 100% rename from TOU_EN.html rename to terms_of_use_en.html