remove print log and uuid generate

This commit is contained in:
kenneth 2024-12-10 09:44:17 +08:00
parent 8a0cc68a22
commit cff64975d7
2 changed files with 2 additions and 8 deletions

View File

@ -10,9 +10,7 @@ const (
ContextUser ctxKey = "context_user" ContextUser ctxKey = "context_user"
) )
var ( var secureCookie *securecookie.SecureCookie
secureCookie *securecookie.SecureCookie
)
type ctxKey string type ctxKey string
@ -22,8 +20,7 @@ type Authorize struct {
} }
func genId() string { func genId() string {
id, _ := uuid.NewRandom() return uuid.Must(uuid.NewRandom()).String()
return id.String()
} }
func SetSecureCookie(sc *securecookie.SecureCookie) { func SetSecureCookie(sc *securecookie.SecureCookie) {

View File

@ -2,7 +2,6 @@ package handler
import ( import (
"io/fs" "io/fs"
"log"
"net/http" "net/http"
"time" "time"
@ -36,8 +35,6 @@ func CreateShortUrl(templates fs.FS, store db.Store) http.HandlerFunc {
return return
} }
log.Println(shortUrl)
_, err = store.CreateUserUrl(ctx, &db.CreateUserUrlParams{ _, err = store.CreateUserUrl(ctx, &db.CreateUserUrlParams{
UserID: user.ID, UserID: user.ID,
ShortUrl: shortUrl, ShortUrl: shortUrl,