mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
add RealUserMiddleware and update resource retrieval to track real users
This commit is contained in:
@@ -79,7 +79,7 @@ func serveIndexHtml(c fiber.Ctx) error {
|
||||
idStr := strings.TrimPrefix(path, "/resources/")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err == nil {
|
||||
r, err := service.GetResource(uint(id), c.Hostname())
|
||||
r, err := service.GetResource(uint(id), c.Hostname(), c)
|
||||
if err == nil {
|
||||
if len(r.Images) > 0 {
|
||||
preview = fmt.Sprintf("%s/api/image/%d", serverBaseURL, r.Images[0].ID)
|
||||
|
Reference in New Issue
Block a user