add Metric
All checks were successful
Build Docker Image / build (arm64) (push) Successful in 54s
Build Docker Image / build (amd64) (push) Successful in 2m13s
Build Docker Image / amend-manifest (push) Successful in 5s

This commit is contained in:
thuanle
2024-11-07 09:08:19 +07:00
parent b0ac68cbdb
commit 108458682e
5 changed files with 91 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
package api
import (
"github.com/gin-gonic/gin"
"net/http"
"thuanle.me/ip-info/internal/services/db_updater"
)
func HandleMetrics(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"updated_at": db_updater.DbUpdatedAt.UnixMilli(),
})
}