aboutsummaryrefslogtreecommitdiffstats
path: root/notices/notice-delete.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-06-14 13:56:46 +0800
committerkumavis <aaron@kumavis.me>2018-06-14 13:56:46 +0800
commitac8b56a00defff4cb44a6a34251a19d8ab6159b6 (patch)
tree5ed3feadb4d416098d3b69d86d7c13b591a54f3e /notices/notice-delete.js
parent4481c7be449b31b2aa5cf97ed996576f66ecedce (diff)
downloadtangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar.gz
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar.bz2
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar.lz
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar.xz
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.tar.zst
tangerine-wallet-browser-ac8b56a00defff4cb44a6a34251a19d8ab6159b6.zip
notices - notices collection is now manually edited
Diffstat (limited to 'notices/notice-delete.js')
-rw-r--r--notices/notice-delete.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/notices/notice-delete.js b/notices/notice-delete.js
deleted file mode 100644
index 652f96159..000000000
--- a/notices/notice-delete.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var fs = require('fs')
-var path = require('path')
-var prompt = require('prompt')
-var open = require('open')
-var extend = require('extend')
-var notices = require('./notices.json')
-
-
-console.log('List of Notices')
-console.log(`ID \t DATE \t\t\t TITLE`)
-notices.forEach((notice) => {
- console.log(`${(' ' + notice.id).slice(-2)} \t ${notice.date} \t ${notice.title}`)
-})
-prompt.get(['id'], (error, res) => {
-prompt.start()
- if (error) {
- console.log("Exiting...")
- process.exit()
- }
- var index = notices.findIndex((notice) => { return notice.id == res.id})
- if (index === -1) {
- console.log('Notice not found. Exiting...')
- }
- notices.splice(index, 1)
- fs.unlink(`notices/archive/notice_${res.id}.md`)
- fs.writeFile(`notices/notices.json`, JSON.stringify(notices))
-})