diff options
| author | mo khan <mo@mokhan.ca> | 2022-05-17 18:42:49 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2022-05-17 18:42:49 -0600 |
| commit | 800d1273a2ae24899d11953140df55ec23412b2d (patch) | |
| tree | d14e99a2efd93bc1c3a01b986c6703f0d3f70774 | |
| parent | 16494e226b6f5c5000b066b8d5cd95de918777ae (diff) | |
remove empty fixtures
| -rw-r--r-- | cmd/api/main.go | 5 | ||||
| -rw-r--r-- | pkg/api/fixtures/atlas.json | 80 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications.json | 4 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/AJ9mVozy2TjT.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/IZOPXJcQckFs.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/Phn71neRLLp4.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/QmRk5Ay1eqL0.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/YOVOhT7JagEP.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/cOHuZTvvJ2Oq.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/ctgEmqll8WHo.json | 1 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/global.json | 11 | ||||
| -rw-r--r-- | pkg/api/fixtures/notifications/iHr4UHN0isjZ.json | 1 |
12 files changed, 10 insertions, 98 deletions
diff --git a/cmd/api/main.go b/cmd/api/main.go index 5b1d7a9..ef28543 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -115,6 +115,11 @@ func main() { }) r.Route("/notifications", func(r chi.Router) { + r.Get("/", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(readFixture("notifications.json")) + }) r.Get("/{id}", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) diff --git a/pkg/api/fixtures/atlas.json b/pkg/api/fixtures/atlas.json index 89f04f0..e34a971 100644 --- a/pkg/api/fixtures/atlas.json +++ b/pkg/api/fixtures/atlas.json @@ -8,85 +8,5 @@ "pink", "blueviolet" ] - }, - { - "id": "YOVOhT7JagEP", - "name": "Experian EU", - "label": "Xprn", - "color": [ - "cyan", - "pink", - "blueviolet" - ] - }, - { - "id": "ctgEmqll8WHo", - "name": "Experian JP", - "label": "Xprn", - "color": [ - "cyan", - "pink", - "blueviolet" - ] - }, - { - "id": "iHr4UHN0isjZ", - "name": "NVIDIA NA", - "label": "Nvda", - "color": [ - "orange", - "yellow", - "orangered" - ] - }, - { - "id": "QmRk5Ay1eqL0", - "name": "NVIDIA EU", - "label": "Nvda", - "color": [ - "orange", - "yellow", - "orangered" - ] - }, - { - "id": "AJ9mVozy2TjT", - "name": "NVIDIA JP", - "label": "Nvda", - "color": [ - "orange", - "yellow", - "orangered" - ] - }, - { - "id": "cOHuZTvvJ2Oq", - "name": "Toyota NA", - "label": "Tyta", - "color": [ - "black", - "silver", - "red" - ] - }, - { - "id": "Phn71neRLLp4", - "name": "Toyota EU", - "label": "Tyta", - "color": [ - "black", - "silver", - "red" - ] - }, - { - "id": "IZOPXJcQckFs", - "name": "Toyota JP", - "label": "Tyta", - "color": [ - "black", - "silver", - "red" - ] } ] diff --git a/pkg/api/fixtures/notifications.json b/pkg/api/fixtures/notifications.json new file mode 100644 index 0000000..23155dd --- /dev/null +++ b/pkg/api/fixtures/notifications.json @@ -0,0 +1,4 @@ +{ + "global": 1, + "QwfsJDutXwPD": 7 +} diff --git a/pkg/api/fixtures/notifications/AJ9mVozy2TjT.json b/pkg/api/fixtures/notifications/AJ9mVozy2TjT.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/AJ9mVozy2TjT.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/IZOPXJcQckFs.json b/pkg/api/fixtures/notifications/IZOPXJcQckFs.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/IZOPXJcQckFs.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/Phn71neRLLp4.json b/pkg/api/fixtures/notifications/Phn71neRLLp4.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/Phn71neRLLp4.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/QmRk5Ay1eqL0.json b/pkg/api/fixtures/notifications/QmRk5Ay1eqL0.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/QmRk5Ay1eqL0.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/YOVOhT7JagEP.json b/pkg/api/fixtures/notifications/YOVOhT7JagEP.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/YOVOhT7JagEP.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/cOHuZTvvJ2Oq.json b/pkg/api/fixtures/notifications/cOHuZTvvJ2Oq.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/cOHuZTvvJ2Oq.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/ctgEmqll8WHo.json b/pkg/api/fixtures/notifications/ctgEmqll8WHo.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/ctgEmqll8WHo.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/pkg/api/fixtures/notifications/global.json b/pkg/api/fixtures/notifications/global.json index c692f8b..1cf529a 100644 --- a/pkg/api/fixtures/notifications/global.json +++ b/pkg/api/fixtures/notifications/global.json @@ -1,14 +1,5 @@ [ { - "global": 1, - "QwfsJDutXwPD": 7, - "YOVOhT7JagEP": 1, - "ctgEmqll8WHo": 22, - "iHr4UHN0isjZ": 105, - "QmRk5Ay1eqL0": 3, - "AJ9mVozy2TjT": 12, - "cOHuZTvvJ2Oq": 8, - "Phn71neRLLp4": 0, - "IZOPXJcQckFs": 6 + "content": "Hello, world!" } ] diff --git a/pkg/api/fixtures/notifications/iHr4UHN0isjZ.json b/pkg/api/fixtures/notifications/iHr4UHN0isjZ.json deleted file mode 100644 index fe51488..0000000 --- a/pkg/api/fixtures/notifications/iHr4UHN0isjZ.json +++ /dev/null @@ -1 +0,0 @@ -[] |
