DataMascara / cisc3140-su19-project

https://bc-app-class.herokuapp.com/login/
2 stars 5 forks source link

Database: No title response given for posts #14

Closed Maker-Mark closed 5 years ago

Maker-Mark commented 5 years ago

When getting a post, the title is not given in the response. I added a method that allows finding and returning a post by post text (not a good idea lol). If I could get the title, then i can just respond to the add post with the new post that was just added simply by looking for one with the same title (since they are unique) image

chalshaff12 commented 5 years ago

It should be returning the title now.. See if you can change the method back to the orginal return and search by title.

I should have a way of returning the ID of the added post but I wasn't able to get it working right away, so let's stick to searching by title for now.. If I can get the ID returned I'll let you know, it would be a better way to search for the post.

chalshaff12 commented 5 years ago

**Important update for @Maker-Mark

I changed the function a bit which shouldn't affect you, but the return should now be giving you the new post. It is searching by the post ID which is much more efficient on all ends.. We can get rid of the post_by_title function if this works.