chore: 更新 SproutGate 认证集成

This commit is contained in:
2026-06-24 21:58:50 +08:00
parent f1417891ac
commit f0dce7ad91

View File

@@ -12,6 +12,7 @@ import (
const defaultAuthAPIURL = "https://auth.api.shumengya.top" const defaultAuthAPIURL = "https://auth.api.shumengya.top"
type SproutGateClient struct { type SproutGateClient struct {
apiURL string apiURL string
httpClient *http.Client httpClient *http.Client
@@ -30,6 +31,8 @@ type SproutGateUser struct {
Email string `json:"email"` Email string `json:"email"`
} }
func NewSproutGateClient(apiURL string) *SproutGateClient { func NewSproutGateClient(apiURL string) *SproutGateClient {
if apiURL == "" { if apiURL == "" {
apiURL = defaultAuthAPIURL apiURL = defaultAuthAPIURL