基本功能复刻完成
All checks were successful
build / build (api, amd64, linux) (push) Successful in -47s
build / build (api, arm64, linux) (push) Successful in -47s
build / build (api.exe, amd64, windows) (push) Successful in -48s

This commit is contained in:
CN-JS-HuiBai
2026-04-17 12:24:00 +08:00
parent 06da23fbbc
commit 981ee4f406
37 changed files with 11737 additions and 770 deletions

View File

@@ -706,34 +706,6 @@ func UserGetStripePublicKey(c *gin.Context) {
Fail(c, http.StatusBadRequest, "payment is not found")
}
func AdminConfigSave(c *gin.Context) {
var payload map[string]any
if err := c.ShouldBindJSON(&payload); err != nil {
Fail(c, http.StatusBadRequest, "invalid request body")
return
}
now := time.Now()
for key, value := range payload {
if nested, ok := value.(map[string]any); ok {
for nestedKey, nestedValue := range nested {
if err := upsertSetting(nestedKey, nestedValue, now); err != nil {
Fail(c, http.StatusInternalServerError, "failed to save config")
return
}
}
continue
}
if err := upsertSetting(key, value, now); err != nil {
Fail(c, http.StatusInternalServerError, "failed to save config")
return
}
}
Success(c, true)
}
func quickLoginURL(c *gin.Context, userID int, redirectValues ...string) string {
redirect := ""
for _, candidate := range redirectValues {