From f49fcf7c0c9a01b7b2fd480c3731efe587c95882 Mon Sep 17 00:00:00 2001 From: Kris Koishigawa Date: Wed, 22 Apr 2020 19:44:52 +0900 Subject: [PATCH 1/3] fix: syncs index.html and README.md with the example project at https://curse-arrow.glitch.me/ --- README.md | 8 ++++---- views/index.html | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2b762a9..af7aed5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # API Project: Timestamp Microservice for FCC -### User stories : +### User stories: 1. The API endpoint is `GET [project_url]/api/timestamp/:date_string?` 2. A date string is valid if can be successfully parsed by `new Date(date_string)` (JS) . Note that the unix timestamp needs to be an **integer** (not a string) specifying **milliseconds**. In our test we will use date strings compliant with ISO-8601 (e.g. `"2016-11-20"`) because this will ensure an UTC timestamp. @@ -12,8 +12,8 @@ e.g. `{"unix": 1479663089000 ,"utc": "Sun, 20 Nov 2016 17:31:29 GMT"}`. 5. If the date string is **invalid** the api returns a JSON having the structure `{"error" : "Invalid Date" }`. #### Example usage: -* https://curse-arrow.hyperdev.space/api/timestamp/2015-12-15 -* https://curse-arrow.hyperdev.space/api/timestamp/1450137600000 +* https://curse-arrow.glitch.me/api/timestamp/2015-12-25 +* https://curse-arrow.glitch.me/api/timestamp/1451001600000 #### Example output: -* { "unix": 1450137600, "natural": "December 15, 2015" } +* {"unix":1451001600000, "utc":"Fri, 25 Dec 2015 00:00:00 GMT"} \ No newline at end of file diff --git a/views/index.html b/views/index.html index 2f4a701..30a4790 100644 --- a/views/index.html +++ b/views/index.html @@ -6,14 +6,14 @@ Timestamp Microservice - +

API Project: Timestamp Microservice

-

User Stories :

+

User Stories:

  1. The API endpoint is GET [project_url]/api/timestamp/:date_string?
  2. @@ -30,8 +30,8 @@

    Example Usage:

    Example Output:

    @@ -41,7 +41,7 @@
From 2e7849ad37716fbffdaacc61e60716dfc69584b2 Mon Sep 17 00:00:00 2001 From: Kris Koishigawa Date: Thu, 23 Apr 2020 01:15:26 +0900 Subject: [PATCH 2/3] fix: update fCC URL --- views/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 30a4790..595e596 100644 --- a/views/index.html +++ b/views/index.html @@ -41,7 +41,7 @@ From b2b2330cfc43340c1f31be30f51c422413a0ad74 Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Thu, 23 Apr 2020 15:42:35 +0900 Subject: [PATCH 3/3] Update views/index.html Co-Authored-By: Oliver Eyton-Williams --- views/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 595e596..c4852a5 100644 --- a/views/index.html +++ b/views/index.html @@ -6,7 +6,7 @@ Timestamp Microservice - +