@@ -425,12 +425,12 @@ func loadIsRecommendNewItems(ctx context.Context, s *session.Session) (bool, err
425425 return false , err
426426 }
427427 if len (items ) != asset .ItemsPerPage {
428- return false , failure .New (fails .ErrApplication , failure .Messagef ("/new_item .json の商品数が正しくありません" ))
428+ return false , failure .New (fails .ErrApplication , failure .Messagef ("/new_items .json の商品数が正しくありません" ))
429429 }
430430 isTarget := 0
431431 for _ , item := range items {
432432 if item .Category == nil {
433- return false , failure .New (fails .ErrApplication , failure .Messagef ("/new_item .json のカテゴリが正しくありません (item_id: %d)" , item .ID ))
433+ return false , failure .New (fails .ErrApplication , failure .Messagef ("/new_items .json のカテゴリが正しくありません (item_id: %d)" , item .ID ))
434434 }
435435 if item .Category .ParentID == targetCategoryID {
436436 isTarget ++
@@ -453,7 +453,7 @@ func loadNewItemsAndItems(ctx context.Context, s *session.Session, maxPage int64
453453 // 全件はカウントできない。countUserItemsを何回か動かして確認している
454454 // ここでは商品数はperpage*maxpage
455455 if maxPage > 0 && int64 (c ) != maxPage * asset .ItemsPerPage {
456- return failure .New (fails .ErrApplication , failure .Messagef ("/new_item .json の商品数が正しくありません" ))
456+ return failure .New (fails .ErrApplication , failure .Messagef ("/new_items .json の商品数が正しくありません" ))
457457 }
458458
459459 chkItemIDs := itemIDs .RandomIDs (checkItem )
@@ -480,20 +480,20 @@ func loadItemIDsFromNewItems(ctx context.Context, s *session.Session, itemIDs *I
480480 return err
481481 }
482482 if loop < 50 && asset .ItemsPerPage != len (items ) { // MEMO 50件よりはみないだろう
483- return failure .New (fails .ErrApplication , failure .Messagef ("/users/transactions .json の商品数が正しくありません (user_id: %d)" , s . UserID ))
483+ return failure .New (fails .ErrApplication , failure .Messagef ("/new_items .json の商品数が正しくありません" ))
484484 }
485485 for _ , item := range items {
486486 if nextCreatedAt > 0 && nextCreatedAt < item .CreatedAt {
487- return failure .New (fails .ErrApplication , failure .Messagef ("/new_item .jsonはcreated_at順である必要があります" ))
487+ return failure .New (fails .ErrApplication , failure .Messagef ("/new_items .jsonはcreated_at順である必要があります" ))
488488 }
489489
490490 if item .Status != asset .ItemStatusOnSale && item .Status != asset .ItemStatusSoldOut {
491- return failure .New (fails .ErrApplication , failure .Messagef ("/new_item .json の商品のステータスが正しくありません (item_id: %d)" , item .ID ))
491+ return failure .New (fails .ErrApplication , failure .Messagef ("/new_items .json の商品のステータスが正しくありません (item_id: %d)" , item .ID ))
492492 }
493493
494494 err = itemIDs .Add (item .ID )
495495 if err != nil {
496- return failure .New (fails .ErrApplication , failure .Messagef ("/new_item .jsonに同じ商品がありました (item_id: %d)" , item .ID ))
496+ return failure .New (fails .ErrApplication , failure .Messagef ("/new_items .jsonに同じ商品がありました (item_id: %d)" , item .ID ))
497497 }
498498 nextItemID = item .ID
499499 nextCreatedAt = item .CreatedAt
0 commit comments