Skip to content

Commit

Permalink
cleaned up db code
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhickey724 committed Jun 14, 2020
1 parent 2b60baf commit 6690c89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions cs153aj/week3/ajaxdemo/server/routes/db.js
Expand Up @@ -10,10 +10,6 @@ store using an object where the keys and values are lists of strings
let data={}
let counter=0

router.use((req,res,next) => {
console.log(`${req.url}: ${req.params}:: ${req.body}:: ${new Date()}`)
next()
})
/* add the value in the body to the list associated to the key */
router.post('/add/:key', (req, res, next) => {
const key = req.params.key
Expand Down
5 changes: 4 additions & 1 deletion cs153aj/week3/ajaxdemo/server/routes/logging.js
Expand Up @@ -8,7 +8,10 @@ store using an object where the keys and values are lists of strings
*/

router.use((req,res,next) => {
console.log(`LOGGING: ${req.url}: ${req.params}:: ${req.body}:: ${new Date()}`)
console.log(`LOGGING: ${req.url
}: ${JSON.stringify(req.params,null,2)
}:: ${JSON.stringify(req.body,null,2)
}:: ${new Date()}`)
next()
})

Expand Down

0 comments on commit 6690c89

Please sign in to comment.