diff options
| author | Jacky Zhao <[email protected]> | 2020-05-11 20:08:51 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-11 20:08:51 -0700 |
| commit | 16bc33e7ac5298b2b3d72be32985dbab6d78db3f (patch) | |
| tree | 8ecea62dff7644ec3cc4bde30d711f9204bf0b92 /backend/api/api.go | |
| parent | Merge pull request #15 from jackyzha0/readme (diff) | |
| parent | Simplify hashing comparison (diff) | |
| download | ctrl-v-16bc33e7ac5298b2b3d72be32985dbab6d78db3f.tar.xz ctrl-v-16bc33e7ac5298b2b3d72be32985dbab6d78db3f.zip | |
Merge pull request #16 from jackyzha0/password
Add password check on post hash
Diffstat (limited to 'backend/api/api.go')
| -rw-r--r-- | backend/api/api.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/api/api.go b/backend/api/api.go index 59242ef..9dd68a9 100644 --- a/backend/api/api.go +++ b/backend/api/api.go @@ -31,7 +31,8 @@ func Serve(port int) { r := mux.NewRouter() r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST", "OPTIONS") - r.HandleFunc("/api/{hash}", getHashFunc).Methods("GET", "OPTIONS") + r.HandleFunc("/api/{hash}", getPasteFunc).Methods("GET", "OPTIONS") + r.HandleFunc("/api/{hash}", getPasteWithPasswordFunc).Methods("POST", "OPTIONS") http.Handle("/", r) |