mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
user details page
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user