From 3b13a61123becc63823ab0c0941aaff2048b020e Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 8 Aug 2024 21:17:06 +0900 Subject: feat(backend/worker): calculate code hash in api-server --- worker/models.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'worker/models.go') diff --git a/worker/models.go b/worker/models.go index c60002c..9f60eb0 100644 --- a/worker/models.go +++ b/worker/models.go @@ -19,6 +19,7 @@ var ( type swiftCompileRequestData struct { MaxDurationMilliseconds int `json:"max_duration_ms"` Code string `json:"code"` + CodeHash string `json:"code_hash"` } func (req *swiftCompileRequestData) maxDuration() time.Duration { @@ -40,7 +41,7 @@ type swiftCompileResponseData struct { type wasmCompileRequestData struct { MaxDurationMilliseconds int `json:"max_duration_ms"` - Code string `json:"code"` + CodeHash string `json:"code_hash"` } type wasmCompileResponseData struct { @@ -62,7 +63,7 @@ func (req *wasmCompileRequestData) validate() error { type testRunRequestData struct { MaxDurationMilliseconds int `json:"max_duration_ms"` - Code string `json:"code"` + CodeHash string `json:"code_hash"` Stdin string `json:"stdin"` } -- cgit v1.2.3-70-g09d2