mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
feat: add healthcheck
This commit is contained in:
@@ -150,6 +150,7 @@ func Run(config types.Config, users types.UserList) {
|
|||||||
"status": 200,
|
"status": 200,
|
||||||
"isLoggedIn": true,
|
"isLoggedIn": true,
|
||||||
"username": usernameString,
|
"username": usernameString,
|
||||||
|
"version": assets.Version,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -160,6 +161,14 @@ func Run(config types.Config, users types.UserList) {
|
|||||||
"status": 200,
|
"status": 200,
|
||||||
"isLoggedIn": false,
|
"isLoggedIn": false,
|
||||||
"username": "",
|
"username": "",
|
||||||
|
"version": assets.Version,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
router.GET("/api/healthcheck", func (c *gin.Context) {
|
||||||
|
c.JSON(200, gin.H{
|
||||||
|
"status": 200,
|
||||||
|
"message": "OK",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user