Openstatus www.openstatus.dev

๐Ÿ› save some bandwith and memory (#1133)

* ๐Ÿ› save some bandwith and memory

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
3d30cbd2 efafa52b

+7 -2
+5
apps/checker/handlers/checker.go
··· 311 311 312 312 returnData := c.Query("data") 313 313 if returnData == "true" { 314 + 315 + if len(result.Body) > 1024 { 316 + result.Body = result.Body[:1000] 317 + } 318 + 314 319 c.JSON(http.StatusOK, result) 315 320 316 321 return
+2 -2
apps/server/src/v1/monitors/trigger/post.ts
··· 186 186 function generateUrl({ row }: { row: z.infer<typeof selectMonitorSchema> }) { 187 187 switch (row.jobType) { 188 188 case "http": 189 - return `https://openstatus-checker.fly.dev/checker/http?monitor_id=${row.id}&trigger=api&data=true`; 189 + return `https://openstatus-checker.fly.dev/checker/http?monitor_id=${row.id}&trigger=api&data=false`; 190 190 case "tcp": 191 - return `https://openstatus-checker.fly.dev/checker/tcp?monitor_id=${row.id}&trigger=api&data=true`; 191 + return `https://openstatus-checker.fly.dev/checker/tcp?monitor_id=${row.id}&trigger=api&data=false`; 192 192 default: 193 193 throw new Error("Invalid jobType"); 194 194 }