cswork / OAOpen practice workspace

AmazonOA #6

MovieDB(MERN): User Review Moderation & Rate Limiting

Estimated MediumNon-algorithmicStatement and editorial — judging is being prepared

Topics (AI-labelled)HashingStringsSimulation

POST /api/reviews/:movieId 应:

  1. 扫描评论里的 inappropriateWords 列表 (在 README.md), 命中则 400 + {message, inappropriateWords, isFlagged: true}
  2. Rate limit: 每用户 4 reviews / 60s combined
  3. 同一用户被拒 3 次后 flag 帐号, 禁止再 post/edit

考点: middleware 链式 rate-limit (express-rate-limit 或自实现), in-memory Map<userId, count>, regex word boundary \\b.


Editorial

Loading solution…