Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix endpoint for accessing latest checkin #619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const latestCheckin = await redisClient.xrevrange(checkinStreamKey, 'TODO');

Remember: When using ioredis, each parameter to a Redis command needs to be passed as a separate value.

Test your code by visiting `http://localhost:8081/checkins/latest` - you should see a JSON representation of a checkin.
Test your code by visiting `http://localhost:8081/api/checkins/latest` - you should see a JSON representation of a checkin.

To make sure your code returns the latest checkin, you need to POST a checking using Postman. Start the Checkin Receiver component in a new terminal window:

Expand All @@ -141,7 +141,7 @@ Then use Postman to POST a checkin. In Postman, open a new request, configure it

![Checkin Test with Postman](images/xrevrange_checkin_test.png)

Now when you refresh `http://localhost:8081/checkins/latest` in your browser, the values shown should match those that you supplied in Postman.
Now when you refresh `http://localhost:8081/api/checkins/latest` in your browser, the values shown should match those that you supplied in Postman.

## External Resources

Expand Down