user details page

This commit is contained in:
2025-05-14 16:48:52 +08:00
parent cbac071dd2
commit 3b7d52a7a8
20 changed files with 450 additions and 64 deletions

View File

@@ -3,8 +3,6 @@ package service
import (
"bytes"
"errors"
"github.com/gofiber/fiber/v3/log"
"github.com/google/uuid"
"image"
"net/http"
"nysoure/server/dao"
@@ -13,6 +11,9 @@ import (
"os"
"time"
"github.com/gofiber/fiber/v3/log"
"github.com/google/uuid"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
@@ -116,7 +117,7 @@ func GetImage(id uint) ([]byte, error) {
}
data, err := os.ReadFile(imageDir + i.FileName)
if err != nil {
return nil, errors.New("Failed to read image file")
return nil, errors.New("failed to read image file")
}
return data, nil
}