add API monitor

This commit is contained in:
joseph le 2023-09-21 15:34:44 +07:00
parent 3098d054c5
commit 9e030e764c
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ Route.get('/api/images/:filename', "ImagesController.getImage");
Route.get('/api/monitor', async ({ request, response }) => {
try {
await Database.raw("SELECT 1")
console.log(await Database.raw("SELECT 1"))
response.status(200).send("I'm fine!")
} catch (error) {
response.status(203).send("Can't connect to database!")