Freecodecamp: API Timestamp Microservice

Created on 11 Dec 2018  路  9Comments  路  Source: freeCodeCamp/freeCodeCamp


Describe your problem and how to reproduce it:
The Example Usage time link is listed as:
[project url]/api/timestamp/1450137600

But when you click onto it it opens up to:
https://curse-arrow.glitch.me/api/timestamp/1450137600000

With a few extra zeros at the end.

While not a big bug, it did take me 20 minutes to realise what the problem was.

Add a Link to the page with the problem:
https://curse-arrow.glitch.me/

Tell us about your browser and operating system:

  • Browser Name: Firefox
  • Browser Version: 63.0.3 (64-bit)
  • Operating System: Ubuntu 18.04.1 LTS

If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):

learn

Most helpful comment

here's the glitch project...
https://glitch.com/edit/#!/curse-arrow?path=views/index.html:1:0
and the github boilerplate...
https://github.com/freeCodeCamp/boilerplate-project-timestamp/blob/gomix/views/index.html

it looks like they have diverged a bit, but you can see the glitch project has...
<li><a href="api/timestamp/1450137600000">[project url]/api/timestamp/1450137600</a></li>
the link is to many zero's, and the visible text has just the two zero's

I'm thinking we should maybe fix the glitch project then export it back to the github boilerplate so they are identical again.

All 9 comments

Bit of a weird one. Not exactly a bug as you mention but a bit inconsistent.
Not really sure how we would fix that through GitHub but I would suggest using 1451001600000 for consistency to point all the examples and outputs to the same date.
Well spotted @Recelis

@Recelis, @bikingbadger Is this something where you the the challenge instructions could have a note or extra information to aid the camper in completing this challenge? If so, would either of you be interested in creating a pull request on GitHub for this?

yes @RandellDawson it would be. I'm not sure how to find the code for this to do the pull request.

@raisedadead Any advice on where to fix this?

here's the glitch project...
https://glitch.com/edit/#!/curse-arrow?path=views/index.html:1:0
and the github boilerplate...
https://github.com/freeCodeCamp/boilerplate-project-timestamp/blob/gomix/views/index.html

it looks like they have diverged a bit, but you can see the glitch project has...
<li><a href="api/timestamp/1450137600000">[project url]/api/timestamp/1450137600</a></li>
the link is to many zero's, and the visible text has just the two zero's

I'm thinking we should maybe fix the glitch project then export it back to the github boilerplate so they are identical again.

I just created a pull request to edit the GitHub boilerplate but looking back at it now. I'm not sure how the glitch code relates to the actual site but it needs to be changed too.

Where's the PR @Recelis? You should probably put a reference to this issue on it so we know.

Hi @moT01 it's called Update index.html 19. The link is https://github.com/freeCodeCamp/boilerplate-project-timestamp/pull/19

Hey @moT01 can you QA the PR? If good, let me know and I will merge it. If I understand, that is the only action item from our side. And the glitch project itself is fine?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichaelLeeHobbs picture MichaelLeeHobbs  路  3Comments

ROWn1ne picture ROWn1ne  路  3Comments

trashtalka3000 picture trashtalka3000  路  3Comments

danielonodje picture danielonodje  路  3Comments

robwelan picture robwelan  路  3Comments