better api

This commit is contained in:
2025-08-17 01:08:22 +02:00
parent 882a6e2c14
commit bbbb760afd
8 changed files with 38 additions and 39 deletions

View File

@@ -9,8 +9,9 @@ import (
"path/filepath"
"strconv"
"github.com/gin-gonic/gin"
"fitra-backend/utils"
"github.com/gin-gonic/gin"
)
func generateID() (string, error) {
@@ -101,7 +102,7 @@ func HandleFileUpload(c *gin.Context) {
}
// Send analytics event
utils.SendAnalyticsEvent("file_upload", "/api/upload", "File Upload", c.GetHeader("User-Agent"), c.ClientIP())
utils.SendAnalyticsEvent("pageview", "/api/upload")
c.JSON(http.StatusOK, gin.H{
"message": "File uploaded successfully",