Worked with @keenencharles(thanks man!) to figure out how to redirect user to newly published post using this.$router.push(/posts/${res.data.slug}) . Were stuck for a bit on what the route URL is, until we logged the endpoint to see if/what it returns the data from the new post, and how it's named/structured. Lesson learned for me: console.log is best friend when debugging, log at every point, and inspect the data going out and in.
Jason Leow
Author
yes indeed! I often reflexively reach out for google/stackoverflow at first drop of an error, not the smartest way to debug i realised!
Please sign in to leave a comment.