diff --git a/controllers/url.go b/controllers/url.go index ceea4b7..f76c269 100644 --- a/controllers/url.go +++ b/controllers/url.go @@ -94,15 +94,6 @@ func CreateTinyURL(ctx *gin.Context, db *bun.DB) { return } - body.CreatedAt = time.Now().UTC() - - if _, err := db.NewInsert().Model(&body).Exec(ctx); err != nil { - ctx.JSON(http.StatusInternalServerError, dtos.URLCreationResponse{ - Message: "Failed to create tiny URL", - }) - return - } - if err := utils.IncrementURLCount(body.UserID, db, ctx); err != nil { ctx.JSON(http.StatusInternalServerError, dtos.URLCreationResponse{ Message: "Failed to increment URL count: " + err.Error(),