Skip to content

Comments

Refactor: remove old foodpicker API, add fortune-today API#12

Merged
Alonza0314 merged 1 commit intoAlonza0314:stu/114from
Zach1113:feature/fortune-today-api
Oct 6, 2025
Merged

Refactor: remove old foodpicker API, add fortune-today API#12
Alonza0314 merged 1 commit intoAlonza0314:stu/114from
Zach1113:feature/fortune-today-api

Conversation

@Zach1113
Copy link

@Zach1113 Zach1113 commented Oct 5, 2025

Summary

  • Removed the old foodpicker API and its tests.
  • Added the new fortune-today API with corresponding routes, processor, and tests.

Reason for removal

  • The old API code was not structured cleanly and hard to maintain.
  • There were redundant functions and unclear routing, making further extensions difficult.
  • Replacing it with a new, well-structured API improves readability, maintainability, and testability.

New API Features

  • GET /fortune: returns today's fortune with lucky color and number.
  • POST /fortune: allows adding new fortune entries.
  • Includes unit tests for processor and API routes.

Notes

  • No changes to other unrelated modules.
  • All old API references removed to prevent confusion.

@Zach1113
Copy link
Author

Zach1113 commented Oct 5, 2025

Hello @Alonza0314 , I find my previous foodpicker api code quite nasty, and would like to build a new api with better structured code

@Alonza0314
Copy link
Owner

No problem!

@Zach1113
Copy link
Author

Zach1113 commented Oct 5, 2025

Everything’s ready for review, CI passed and no conflicts
Please take a look when you have time, thanks👍

@Alonza0314 Alonza0314 merged commit 0a2a20c into Alonza0314:stu/114 Oct 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants