rename storage variables to store
This commit is contained in:
parent
e51a5f4fd7
commit
a7392da5fb
1 changed files with 4 additions and 4 deletions
8
main.go
8
main.go
|
@ -17,7 +17,7 @@ import (
|
|||
var embedFS embed.FS
|
||||
|
||||
func run() error {
|
||||
storage, err := newStore()
|
||||
store, err := newStore()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -36,13 +36,13 @@ func run() error {
|
|||
mux.Handle(
|
||||
"POST /api/password",
|
||||
middlewares.RateLimiter(
|
||||
routes.CreatePassword(storage, maxPasswordLength),
|
||||
routes.CreatePassword(store, maxPasswordLength),
|
||||
1*time.Minute,
|
||||
5,
|
||||
),
|
||||
)
|
||||
mux.Handle("GET /api/password/{id}", routes.GetPassword(storage))
|
||||
mux.Handle("HEAD /api/password/{id}", routes.HasPassword(storage))
|
||||
mux.Handle("GET /api/password/{id}", routes.GetPassword(store))
|
||||
mux.Handle("HEAD /api/password/{id}", routes.HasPassword(store))
|
||||
|
||||
if logRequests {
|
||||
handler = middlewares.Logger(handler)
|
||||
|
|
Loading…
Reference in a new issue