I noticed there were a couple bugs in the code, with the delete method endpoint being called twice for method cases that were not related to DELETE, and again when the userEmail field was replaced with postID in handler_create_user.go. I fixed those but the Post field is still empty when I call on any of the post handlers. I could use help in finding the root cause of this problem.
Steps to Reproduce:
1.) go build && ./SocialServer
2.) Call POST http://localhost:email@example.com to create the user with the given email
3.) Call POST http://localhost:8080/posts/. This should call on the existing user email to attach a post to the username.
4.) Check the db.json file and format the document so its easier on the eyes. You should see an instance of a post created in the http response body, but none created in the db.json file.
Here is the link to the repo. Thanks for the help in advance, should I receive any.