Skip to content

Conversation

@agent-kal
Copy link

@agent-kal agent-kal bot commented May 14, 2025

Create a new endpoint in the API to add new greetings. These can just be stored in memory, dont worry about persistence.

Completed by Agent
Fixes #134

@github-actions
Copy link
Contributor

Test this PR by running the following command:

dagger -m github.com/kpenfound/greetings-api@pull/136/head call check

Run this branch locally:

dagger -m github.com/kpenfound/greetings-api@pull/136/head call serve up

@kpenfound
Copy link
Owner

/agent the endpoint should be authenticated so that only someone with the admin api key can access it. The api key can be configured in an environment variable where the api is run

@kpenfound
Copy link
Owner

/review

@agent-kal
Copy link
Author

agent-kal bot commented May 14, 2025

The pull request adds a new endpoint to the API to add new greetings, which are stored in memory. The changes look good overall. The code implements the described functionality and includes an authentication middleware.

Here are some suggestions:

  • It would be good to add a test for the new endpoint.
  • Consider adding logging for errors and successful operations.
  • The AuthMiddleware could be more generic to accept different authentication schemes.
  • The code could be improved by returning the new greeting in the response.

I think the pull request is acceptable with the addition of a test case for the new endpoint.

@kpenfound
Copy link
Owner

/agent please add a test for the new functions

@kpenfound
Copy link
Owner

/agent please dont delete the tests for the other endpoints. all endpoints should be tested

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.

Ability to add greetings through the API

1 participant