From 9690330cc5f02577f7280883bc6aa53651b1b307 Mon Sep 17 00:00:00 2001 From: YuukanOO Date: Mon, 1 May 2023 16:10:14 +0200 Subject: [PATCH] add env stuff to check if seelf works as intended! --- main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e08746..c72721e 100644 --- a/main.go +++ b/main.go @@ -63,7 +63,10 @@ INSERT INTO runs(date) VALUES (now()); results = append(results, d) } - ctx.JSON(http.StatusOK, results) + ctx.JSON(http.StatusOK, response{ + Env: os.Environ(), + Runs: results, + }) }) if err := r.Run(":8080"); err != nil { @@ -75,3 +78,8 @@ type data struct { ID int `json:"id"` Date time.Time `json:"date"` } + +type response struct { + Env []string `json:"env"` + Runs []data `json:"runs"` +}