Skip to content

Commit d9f854a

Browse files
author
Alex Alekseyenko
committed
Make trivial changes and add TODO to add linter
1 parent 984b467 commit d9f854a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ If you are developing and would like the app to restart on file changes:
1717
npm run dev
1818

1919
# TODOs
20+
- add linter
2021
- write tests
2122
- validate input

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,12 @@ app.get('/', (req, res) => {
9797
</script>
9898
</body>
9999
</html>
100-
`)})
101-
})
100+
`)})})
102101

103102
app.post('/', (req, res) => {
104103
const record = Object.assign({}, ...FIELDS.map((field) => ({[field]: req.body[field]})))
105-
var records
106104
fs.readFile(FILEPATH, (err, data) => {
107-
records = JSON.parse(data)
105+
var records = JSON.parse(data)
108106
logger.info(`Appending new record:\n\t${JSON.stringify(record)}`)
109107
records.push(record)
110108
fs.writeFile(FILEPATH, JSON.stringify(records), (err) => {

0 commit comments

Comments
 (0)