Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I added the endpoints for the todos (CURD) and then i added the tod #7

Closed
wants to merge 58 commits into from

Conversation

IsraelOjiefoh
Copy link
Contributor

I added the endpoints for the todos (CURD) and then i added the todo-api.yaml file to the array in the generate.js file

@elmerbulthuis
Copy link
Member

Cool! Next step would be to merge IsraelOjiefoh#1, and then proper request, response bodied and status codes!

👍

.gitignore Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
IsraelOjiefoh and others added 11 commits August 6, 2024 02:31
…es. -The todo-item-update schema uses oneOf to handle different required fields depending on the type of update.
… added npm/todo folder to the work-space created client.ts, root.ts, server.ts, and also todo.ts in the operation handler folder. It's time to start working now🚀
Every function of the api is now a seperate operation.

export const addTodoOperationHandler: api.server.AddTodoItemOperationHandler<{}> = async (todo: string) => {
const createTodoCommand = new CreateTodo(todo);
const commandHandlers = new CommandHandlers();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point this needs to be scoped to the server lifetime. So every server should have one commandHandlers object. There are various options to do this, like:

  • use a global (absolutely not preferred!!)
  • a hook (very "cool" and clean solution)
  • create operationhandler in a factory, pass the command handlers to the factory

Let's discuss those options later! After implenting all the operationhandlers with dummy / example code

IsraelOjiefoh and others added 5 commits August 9, 2024 08:42
…res a �undled folder inside the odo-api library but i don't know how to generate it. Please i want us to discuss this!!
@elmerbulthuis elmerbulthuis reopened this Sep 16, 2024

if (this.todos.has(todoId)) {
if (todoToUpdate) {
todoToUpdate.todoName = "Go to the gym";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be variable

Copy link
Contributor Author

@IsraelOjiefoh IsraelOjiefoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted!

Elmer Bulthuis added 2 commits September 17, 2024 14:23
@elmerbulthuis
Copy link
Member

continue in #10

@elmerbulthuis
Copy link
Member

continue here, #10 is invalid

@IsraelOjiefoh IsraelOjiefoh changed the title I added the endpoints for the todos (CURD) and then i added the todo-… I added the endpoints for the todos (CURD) and then i added the tod Sep 26, 2024
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