Refactor message sending into logic package (+ more tests for uptime-kuma)
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 1m33s
Build Docker and Deploy / Deploy to Server (push) Successful in 7s

This commit is contained in:
2023-08-12 19:04:04 +02:00
parent a4a651229c
commit 9f656bdefe
10 changed files with 832 additions and 510 deletions

View File

@@ -1,3 +1,8 @@
package util
type FormData map[string]string
type RawJSON struct {
ContentType string
Body string
}

View File

@@ -114,6 +114,9 @@ func RequestAny[TResult any](t *testing.T, akey string, method string, baseURL s
}
bytesbody = bodybuffer.Bytes()
contentType = writer.FormDataContentType()
case RawJSON:
bytesbody = []byte(body.(RawJSON).Body)
contentType = "application/json"
default:
bjson, err := json.Marshal(body)
if err != nil {