From b80d38e7a5173fd2126ab01b8412fa871cb43dca Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Sat, 9 May 2020 16:50:38 -0600 Subject: Add get hash endpoint --- api/api.go | 1 + 1 file changed, 1 insertion(+) (limited to 'api/api.go') diff --git a/api/api.go b/api/api.go index 81ee0a0..e6372e7 100644 --- a/api/api.go +++ b/api/api.go @@ -31,6 +31,7 @@ func Serve(port int) { r := mux.NewRouter() r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST") + r.HandleFunc("/{hash}", getHashFunc).Methods("GET") http.Handle("/", r) -- cgit v1.2.3 From d81c5ce33f439ec57d2835e140d43d84b1a273ad Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Sat, 9 May 2020 16:57:23 -0600 Subject: Change endpoint name --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/api.go') diff --git a/api/api.go b/api/api.go index e6372e7..c197774 100644 --- a/api/api.go +++ b/api/api.go @@ -31,7 +31,7 @@ func Serve(port int) { r := mux.NewRouter() r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST") - r.HandleFunc("/{hash}", getHashFunc).Methods("GET") + r.HandleFunc("/api/{hash}", getHashFunc).Methods("GET") http.Handle("/", r) -- cgit v1.2.3