Conversation
Travis-Owens
left a comment
There was a problem hiding this comment.
@Mathisco-01, overall good work. Only a couple of minor things that need to be reviewed.
Both the "TEST_INTERVAL" and "PORT" constants are not being used throughout the source code.
Outside of this PR, we should consider replacing the occurrences of "localhost" with a constant placeholder to facilitate distributing this application in a cloud environment.
api/src/bump_test.go
Outdated
| "guildId": guildId, | ||
| }) | ||
|
|
||
| resp, _ := http.Post("http://localhost:8080/V1/bump", "application/json", bytes.NewBuffer(reqBody)) |
There was a problem hiding this comment.
See previous comment.
api/src/main.go
Outdated
| const ( | ||
| PORT = ":8080" | ||
| BUMP_INTERVAL = 60 // 1 minute in seconds | ||
| TEST_INTERVAL = 2 |
There was a problem hiding this comment.
This constant has not been implemented/used.
|
I almost forgot to mention but I added documentation for the fetch route. |
Travis-Owens
left a comment
There was a problem hiding this comment.
@Mathisco-01, good job on resolving the issues. Looking forward, we should add more commenting to the source code, as this will increase readability and maintainability.
Added some questionable (but working) test code.
You can run it by doing
go test.Also added the
/V1/fetchroute to get the latest 10 bumped servers.