fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m54s

This commit is contained in:
2026-03-03 19:10:59 -08:00
parent f773fe1d6d
commit 8bdc8afea3
5 changed files with 185 additions and 12 deletions
@@ -0,0 +1,37 @@
package types
import (
"encoding/json"
"testing"
)
func TestDeleteAccountResponseAlwaysContainsIntFields(t *testing.T) {
data, err := json.Marshal(DeleteAccountResponse{
Success: true,
Message: "ok",
})
if err != nil {
t.Fatalf("failed to marshal response: %v", err)
}
var decoded map[string]interface{}
if err = json.Unmarshal(data, &decoded); err != nil {
t.Fatalf("failed to decode response: %v", err)
}
userID, hasUserID := decoded["user_id"]
if !hasUserID {
t.Fatalf("expected user_id in JSON, got %s", string(data))
}
if userID != float64(0) {
t.Fatalf("expected user_id=0, got %v", userID)
}
code, hasCode := decoded["code"]
if !hasCode {
t.Fatalf("expected code in JSON, got %s", string(data))
}
if code != float64(0) {
t.Fatalf("expected code=0, got %v", code)
}
}
+2 -2
View File
@@ -2968,8 +2968,8 @@ type GetSubscribeStatusRequest struct {
type DeleteAccountResponse struct {
Success bool `json:"success"`
Message string `json:"message,omitempty"`
UserId int64 `json:"user_id,omitempty"`
Code int `json:"code,omitempty"`
UserId int64 `json:"user_id"`
Code int `json:"code"`
}
type GetDownloadLinkRequest struct {