instructions.txt has the instructions to run the service
guidelines.txt has the guidelines to be followed while solving and submitting the assignment
problem-statement.txt has the problems statements to be solved
Problem 1 commit - commit
Problem 2 commit - commit
Problem 3 commit - commit
Future enhancements can begin by sending proper error codes and messages in API responses. For now, I have followed the same pattern that was implemented in the code.
Create news by matchId
curl --location --request POST 'localhost:3000/news' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "abc",
"description": "test",
"matchId": 7
}'
Create news by tourId
curl --location --request POST 'localhost:3000/news' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "abc",
"description": "test",
"tourId": 3
}'
Get news by matchId
curl --location --request GET 'localhost:3000/news/matches/1'
Get news by tourId
curl --location --request GET 'localhost:3000/news/tours/1'
Get news by sportId
curl --location --request GET 'localhost:3000/news/sports/1'