Remove or replace unused favorites API and middleware code

未关闭
#265 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃

调研方向

Start by searching the repository for uses of the favorites helpers in src/services/api.tsx and the /user/favorites middleware match in middleware.ts; audit src/models/user.ts without removing unrelated user data. Compare any remaining callers with the /api/timetables routes and saved-timetable flow. Done when dead favorites code is removed, or dependent callers use the supported API with server-side auth enforced.

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue

There's still some old favorites-related code that doesn't seem to match the current saved-timetable flow.

src/services/api.tsx calls /api/user/favorites, but that route isn't present in the current tree. middleware.ts also matches /user/favorites, while saved timetables now live under /saved and the /api/timetables routes.

Please check whether anything still uses these helpers. If not, remove the dead code and obsolete middleware. If something does depend on them, move it to the supported saved-timetables API and make sure auth remains enforced server-side.

Files: src/services/api.tsx, middleware.ts, src/models/user.ts (audit only — don't delete unrelated user data/models).

主要语言
TypeScript
星标
7
派生
39
平均合并
4 小时 24 分钟
30 天内合并 PR
53

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeChefVIT/ffcs 的其他 Issue

查看 CodeChefVIT/ffcs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。