goshorly/routes/stats.go

17 lines
273 B
Go
Raw Normal View History

package routes
import (
"time"
2022-12-23 21:50:40 +00:00
"gitea.hackmi.ch/Phil/goshorly/db"
"github.com/gofiber/fiber/v2"
)
func GetStats(c *fiber.Ctx) error {
return c.JSON(&fiber.Map{
"Timestamp": time.Now(),
"Totallinks": db.GetTotalLinks(),
"Totalviews": db.GetTotalViews(),
})
}