Add healthcheck endpoint (#170)

This commit is contained in:
Thomas Miceli
2023-12-16 01:27:00 +01:00
parent 246f12c8cb
commit 47869a77c9
4 changed files with 36 additions and 1 deletions

View File

@ -80,3 +80,12 @@ func IsUniqueConstraintViolation(err error) bool {
}
return false
}
func Ping() error {
sql, err := db.DB()
if err != nil {
return err
}
return sql.Ping()
}