diff options
| author | Jacky Zhao <[email protected]> | 2020-05-09 16:02:10 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-09 16:02:10 -0700 |
| commit | 6e69cfa1794d20e3dd41ea9074a7c8a79d51c099 (patch) | |
| tree | fe078d33c11e21b684af8f400d1667b2411c5415 /api/api.go | |
| parent | fix port bug (diff) | |
| parent | Lowercase json response (diff) | |
| download | ctrl-v-6e69cfa1794d20e3dd41ea9074a7c8a79d51c099.tar.xz ctrl-v-6e69cfa1794d20e3dd41ea9074a7c8a79d51c099.zip | |
Merge pull request #2 from jackyzha0/api
Add get hash endpoint
Diffstat (limited to 'api/api.go')
| -rw-r--r-- | api/api.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -31,6 +31,7 @@ func Serve(port int) { r := mux.NewRouter() r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST") + r.HandleFunc("/api/{hash}", getHashFunc).Methods("GET") http.Handle("/", r) |