bee-san / Ares

Automated decoding of encrypted text without knowing the key or ciphers used
MIT License
575 stars 28 forks source link

feat(api): add handler for user info #264

Closed bee-san closed 1 year ago

bee-san commented 1 year ago

Tests

  1. Created docker image with docker build . in root folder
  2. Created Docker Service with docker service create userInfo
  3. Tested the API endpoint with curl

In particular I tested:

$ curl -X GET http://localhost:8080/api/users/123

We can get user info.

curl -X POST -H "Content-Type: application/json" -d '{"name":"John Doe","email":"john.doe@example.com"}' http://localhost:8080/api/users

The API endpoint properly creates a new user with the provided name "John Doe" and email "john.doe@example.com".

curl -X PUT -H "Content-Type: application/json" -d '{"email":"updated-email@example.com"}' http://localhost:8080/api/users/123

The API endpoint successfully updates the email address of the user with the ID "123" to "updated-email@example.com".

curl -X DELETE http://localhost:8080/api/users/123

The API endpoint correctly deletes the user with the ID "123"

Deployed

Deployed in staging environment dev-60, when this is merged it will be automatically deployed to prod-19.

SkeletalDemise commented 1 year ago

This was an example PR for Bee's blog post. 😅 https://skerritt.blog/writing-better-commit-messages/