mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-28 04:27:24 +00:00
Enhance comment functionality with image support and validation.
This commit is contained in:
@@ -19,7 +19,8 @@ func handleUploadImage(c fiber.Ctx) error {
|
||||
if !strings.HasPrefix(contentType, "image/") {
|
||||
return model.NewRequestError("Invalid image format")
|
||||
}
|
||||
id, err := service.CreateImage(uid, data)
|
||||
ip := c.IP()
|
||||
id, err := service.CreateImage(uid, ip, data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user