package listautenti import ( "github.com/gofiber/fiber/v2" "git.phc.dm.unipi.it/phc/website/libs/sl" "git.phc.dm.unipi.it/phc/website/server/database" ) func MountApiRoutesHook(l *sl.ServiceLocator, api fiber.Router) error { db, err := sl.Use(l, database.Slot) if err != nil { return err } api.Get("/lista-utenti", func(c *fiber.Ctx) error { users, err := db.ReadUsers() if err != nil { return err } // TODO: Pre-process data to strip server only fields... return c.JSON(users) }) return nil }