rename storage variables to store

This commit is contained in:
1e99 2024-11-08 17:08:02 +01:00
parent e51a5f4fd7
commit a7392da5fb

View file

@ -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)