Skip to content

LearnersGuild/practice-phase-debugging-gauntlet-solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Solution to Learners Guild Debugging Gauntlet

Links

Learners Guild Debugging Gauntlet Challenge Repo

Bugs to Fix

  • views/partials/footer.ejs

    • refers to wrong .js file name (script.js instead of pets.js)
  • actions/getOwnersByPetId.js

    • query uses wrong column name (o.id instead of o.owner_id)
  • routes/pets.js

    • imports nonexistent function from actions index.js (getOwnersById instead of getOwnersByPetId)
    • getting petId from wrong object (req.query instead of req.params)
    • getOwnersBy(Pet)Id does not have argument passed (should have petId argument passed)
  • public/pets.js

    • onclick event listener attached to wrong class (.pet instead of .pet-name)
    • petOwnerDiv identified by class instead of id
    • .pet-name onclick arrow function doesn't bind "this" (needs to be non-arrow function)
    • fetch does not use .then(response => response.json()) to transform stream response body into object