@@ -2,7 +2,10 @@ const { beginnerRejection } = require('./difficulty-02-beginner');
22const { intermediateRejection } = require ( './difficulty-03-intermediate' ) ;
33const { advancedRejection } = require ( './difficulty-04-advanced' ) ;
44const { capacityLimitReached } = require ( './max-assignments-reached' ) ;
5- const { spamNonGfiAssignment } = require ( './spam-restrictions' ) ;
5+ const {
6+ spamNonGfiAssignment,
7+ spamAssignmentLimitExceeded,
8+ } = require ( './spam-restrictions' ) ;
69
710const REJECTION_REASONS =
811 require ( '../eligibility/rejection-reasons' ) ;
@@ -28,14 +31,26 @@ const rejectionRouter = ({ reason, context = {}, username, urls = {} }) => {
2831 browseIntermediateUrl : urls . intermediate ,
2932 } ) ;
3033
31- // ───── Shared rules
34+ // ─────────────────────────────────────────
35+ // Capacity limits (branch on spam status)
36+ // ─────────────────────────────────────────
3237 case REJECTION_REASONS . CAPACITY :
38+ if ( context . isSpamListed ) {
39+ return spamAssignmentLimitExceeded (
40+ username ,
41+ context . openAssignedCount
42+ ) ;
43+ }
44+
3345 return capacityLimitReached ( {
3446 username,
3547 openAssignedCount : context . openAssignedCount ,
3648 maxAllowed : context . maxAllowed ,
3749 } ) ;
3850
51+ // ─────────────────────────────────────────
52+ // Spam attempting non-GFI assignment
53+ // ─────────────────────────────────────────
3954 case REJECTION_REASONS . SPAM :
4055 return spamNonGfiAssignment ( username ) ;
4156
0 commit comments