Connect the latest handlers to endpoints.
This commit is contained in:
parent
5ffcddf8f7
commit
3b44a55f5a
1 changed files with 6 additions and 4 deletions
|
@ -18,19 +18,19 @@ import (
|
||||||
const ApiVersion = "3"
|
const ApiVersion = "3"
|
||||||
const PathPrefix = "/api/" + ApiVersion
|
const PathPrefix = "/api/" + ApiVersion
|
||||||
|
|
||||||
const PathPrometheus = "/metrics"
|
|
||||||
|
|
||||||
const PathAuthToken = PathPrefix + "/auth/full"
|
const PathAuthToken = PathPrefix + "/auth/full"
|
||||||
|
const PathWallet = PathPrefix + "/wallet"
|
||||||
const PathRegister = PathPrefix + "/signup"
|
const PathRegister = PathPrefix + "/signup"
|
||||||
|
const PathPassword = PathPrefix + "/password"
|
||||||
const PathVerify = PathPrefix + "/verify"
|
const PathVerify = PathPrefix + "/verify"
|
||||||
const PathResendVerify = PathPrefix + "/verify/resend"
|
const PathResendVerify = PathPrefix + "/verify/resend"
|
||||||
const PathPassword = PathPrefix + "/password"
|
|
||||||
const PathWallet = PathPrefix + "/wallet"
|
|
||||||
const PathClientSaltSeed = PathPrefix + "/client-salt-seed"
|
const PathClientSaltSeed = PathPrefix + "/client-salt-seed"
|
||||||
|
|
||||||
const PathUnknownEndpoint = PathPrefix + "/"
|
const PathUnknownEndpoint = PathPrefix + "/"
|
||||||
const PathWrongApiVersion = "/api/"
|
const PathWrongApiVersion = "/api/"
|
||||||
|
|
||||||
|
const PathPrometheus = "/metrics"
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
auth auth.AuthInterface
|
auth auth.AuthInterface
|
||||||
store store.StoreInterface
|
store store.StoreInterface
|
||||||
|
@ -191,6 +191,8 @@ func (s *Server) Serve() {
|
||||||
http.HandleFunc(PathWallet, s.handleWallet)
|
http.HandleFunc(PathWallet, s.handleWallet)
|
||||||
http.HandleFunc(PathRegister, s.register)
|
http.HandleFunc(PathRegister, s.register)
|
||||||
http.HandleFunc(PathPassword, s.changePassword)
|
http.HandleFunc(PathPassword, s.changePassword)
|
||||||
|
http.HandleFunc(PathVerify, s.verify)
|
||||||
|
http.HandleFunc(PathResendVerify, s.resendVerifyEmail)
|
||||||
http.HandleFunc(PathClientSaltSeed, s.getClientSaltSeed)
|
http.HandleFunc(PathClientSaltSeed, s.getClientSaltSeed)
|
||||||
|
|
||||||
http.HandleFunc(PathUnknownEndpoint, s.unknownEndpoint)
|
http.HandleFunc(PathUnknownEndpoint, s.unknownEndpoint)
|
||||||
|
|
Loading…
Add table
Reference in a new issue