清楚默认选择的上号方式

This commit is contained in:
yml
2026-05-23 00:03:59 +08:00
parent efb3b94286
commit 0394fcb2b8
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ type CreateRequest struct {
Title string `json:"title" binding:"required"`
Description string `json:"description"`
ServerRegion string `json:"server_region" binding:"required"`
LoginPlatform string `json:"login_platform" binding:"required"`
LoginPlatform string `json:"login_platform"`
RankLevel string `json:"rank_level"`
HafCoinAmount int64 `json:"haf_coin_amount"`
AssetSummary map[string]any `json:"asset_summary"`
+1 -1
View File
@@ -139,7 +139,7 @@ func (s *Service) FindMine(ownerID uint64, id uint64) (*ListingDTO, error) {
}
func validateRequest(req CreateRequest) error {
if req.Title == "" || req.ServerRegion == "" || req.LoginPlatform == "" {
if req.Title == "" || req.ServerRegion == "" {
return ErrInvalidInput
}
if req.PriceHourly <= 0 || req.DepositAmount < 0 {