Troubleshooting API search functionality

In this meeting, the State Changer (Tommy) is discussing a coding issue he is facing. He is trying to modify a search endpoint in an API. Currently, the endpoint returns a list of a user's friends based on their ID. However, Tommy wants to add functionality to also search for friends based on a search term, regardless of the user's ID.


Another State Changer (Daniel) provides clarification and suggests some changes to the code. They discuss the different possibilities of user ID and search term combinations. They determine that the user ID is always required, and if a search term is provided, the code should filter the friends list by matching names. They make adjustments to the code, such as changing the way they check for a search term and modifying the filtering logic. They also address a case sensitivity problem and debug some issues related to the array structure of the friends' data. Overall, they discuss and troubleshoot the code to ensure that it will filter the friends list correctly based on the user ID and search term. By the end of the meeting, they have resolved the issue and the code is working as intended.


(Source: Office Hours 8/22/2023 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free