remove print log and uuid generate
This commit is contained in:
parent
8a0cc68a22
commit
cff64975d7
@ -10,9 +10,7 @@ const (
|
||||
ContextUser ctxKey = "context_user"
|
||||
)
|
||||
|
||||
var (
|
||||
secureCookie *securecookie.SecureCookie
|
||||
)
|
||||
var secureCookie *securecookie.SecureCookie
|
||||
|
||||
type ctxKey string
|
||||
|
||||
@ -22,8 +20,7 @@ type Authorize struct {
|
||||
}
|
||||
|
||||
func genId() string {
|
||||
id, _ := uuid.NewRandom()
|
||||
return id.String()
|
||||
return uuid.Must(uuid.NewRandom()).String()
|
||||
}
|
||||
|
||||
func SetSecureCookie(sc *securecookie.SecureCookie) {
|
||||
|
||||
@ -2,7 +2,6 @@ package handler
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@ -36,8 +35,6 @@ func CreateShortUrl(templates fs.FS, store db.Store) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
log.Println(shortUrl)
|
||||
|
||||
_, err = store.CreateUserUrl(ctx, &db.CreateUserUrlParams{
|
||||
UserID: user.ID,
|
||||
ShortUrl: shortUrl,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user