Exercise tracker finished

Exercise tracker finished


Just finished my exercise tracker. Bit nervous there may be a few lingering bugs. Would really appreciate any time people could put into breaking it. Also any general constructive criticism is greatly appreciated. Thanks in advance :slight_smile:

App: https://yummy-brow.glitch.me/
Code: https://github.com/npwilliams09/FCC-Back-End/tree/master/Excercise%20Tracker



Didn’t spend much time, but you have a huge bug in your code that makes the app unusable:

app.post('/api/exercise/new-user',(req,res) => {
  createPerson(req.body.username, (err,saveData)=>{
      res.send({error:"Error, Please try again"});
    }else if (saveData = 'taken'){
      res.send({"error":"Username already taken"})

Can you spot the bug? :slight_smile:


ahhh last thing I added. Think i was just a bit excited at that point :stuck_out_tongue: Changed it to a triple = sign. Just want to check this was the bug you were referring to?


Yep, that’s what I meant. Now it works like a charm. Good job!


Thanks for your help :slight_smile: