优化历史包袱,修复发布页面默认0 恢哈伏笔

This commit is contained in:
yml2213
2026-05-23 09:41:45 +08:00
parent d1f46fd02e
commit 40f5252b2e
12 changed files with 101 additions and 335 deletions
@@ -2,6 +2,7 @@ package listing
import (
"errors"
"strings"
)
var (
@@ -151,5 +152,17 @@ func validateRequest(req CreateRequest) error {
if req.HafCoinAmount < 0 {
return ErrInvalidInput
}
if !hasScreenshotURL(req.ScreenshotURLS) {
return ErrInvalidInput
}
return nil
}
func hasScreenshotURL(urls []string) bool {
for _, url := range urls {
if strings.TrimSpace(url) != "" {
return true
}
}
return false
}