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"
)
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) {

View File

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