bounswe / bounswe2018group7

hiStory | A Living History Project
7 stars 1 forks source link

api/v1/search Endpoint #151

Closed eneskosr closed 5 years ago

eneskosr commented 5 years ago

Hello,

This PR contains the implementation of search mechanism as stated here.

Related issue: #146.

eneskosr commented 5 years ago

@cburakaygun Of course, these ids are not for the end users. I thought returning full memory post is not necessary. In frontend, they can retrieve related memory posts with these ids.

cburakaygun commented 5 years ago

I don't think sending a request for every Memory-Post contained in the search result is a good idea. It would be better for frontend to show the users titles and only sending a request for the Memory-Post when the user click on a title.

So, I suggest "memory_posts" key of the search results be like: [ {"id": <id>, "title": <title>}, {"id": <id>, "title": <title>}, ... ]

eneskosr commented 5 years ago

Okay, it does make sense. I have changed the endpoint.

eneskosr commented 5 years ago

I am merging it, thanks for your reviews.