Back End Development and APIs Projects - Timestamp Microservice

My REPL seems to be working through postman but isn’t passing tests - I’ve stopped getting any errors on browsers, and I’m kind of at a loss now. All the test are passing except the call to /api/1451001600000 and the correlate “can handle dates handled by new Date(dateString)” but those seems to be working as well. Wondering if it’s something about how numbers are being expressed, or whether it’s a config thing I’m missing.

Your project link(s)

solution:https://boilerplate-project-timestamp-1.stringrays1.repl.co/

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Back End Development and APIs Projects - Timestamp Microservice

Link to the challenge:

Make sure the unix value is the correct type.

Hint: it must be of type number

1 Like

Thank you!!! I’ve been playing with that thinking that was what was happening for a long time, but I was missing that the literal notation was messing with it. Like, I could check typeof and get number sometimes, but hadn’t realized it would convert like that and wasn’t sure if I should be spending my time there or not. Finally got it to submit!

You can also look at the response object. If it is a number it is just 1235 but if it is a string it is "12345".

{
  someNumber: 12345,
  someString: "12345"
}