Added GET /check

This commit is contained in:
Profitroll 2023-04-14 14:01:53 +02:00
parent c57af57cf8
commit 5f72582c92

View File

@ -48,6 +48,11 @@ func getAvatar(ctx *gin.Context) {
func main() { func main() {
router := gin.Default() router := gin.Default()
router.GET("/avatars/:id", getAvatar) router.GET("/avatars/:id", getAvatar)
router.GET("/check", func(ctx *gin.Context) {
ctx.JSON(http.StatusOK, gin.H{
"detail": "I'm alright, thank you",
})
})
host := os.Getenv("HOST") host := os.Getenv("HOST")
port := os.Getenv("PORT") port := os.Getenv("PORT")
if host == "" { if host == "" {