ngoworldcommunity / NGOWorld-Backend

This is the official repository for Milan's server side codes.
https://api.milanhub.org
MIT License
7 stars 26 forks source link

feat: implemented create event route #39

Closed MahendraDani closed 1 year ago

MahendraDani commented 1 year ago

closes #33

πŸ‘·πŸ» Changes made

  1. Implemented create event route as per given Event Schema
  2. Added status codes and status messages in utils/status.js file to improve code usability.
  3. Added documentation of the route in api.yaml file.
tamalCodes commented 1 year ago

Looks good, can you perhaps do a screen recording and show how the API is working ? That will save me from having to setup the code again and test it manually.

MahendraDani commented 1 year ago

Looks good, can you perhaps do a screen recording and show how the API is working ? That will save me from having to setup the code again and test it manually.

Sure!

MahendraDani commented 1 year ago

API Working

https://github.com/MilanCommunity/Milan-Backend/assets/116940083/5b36a501-0517-433a-8932-c2b425eadc38

Database view

https://github.com/MilanCommunity/Milan-Backend/assets/116940083/34fd89ee-88ab-43c1-bc40-9a8a906af7ca

@tamalCodes If there are any other changes please let me know

tamalCodes commented 1 year ago

Hi @MahendraDani , the changes look amazing to me. Just a thought, wouldn't it be better if the createdAt and updatedAt would have been populated automatically based on the current time instead of us filling in the date and time manually ?

MahendraDani commented 1 year ago

Hi @MahendraDani , the changes look amazing to me. Just a thought, wouldn't it be better if the createdAt and updatedAt would have been populated automatically based on the current time instead of us filling in the date and time manually ?

@tamalCodes Yes you are right! I will implement that. Please tell me the format of date? Like dd-mm-yy or different

MahendraDani commented 1 year ago

@tamalCodes I made the required changes. Now time is dynamically added to createdAt and updatedAt props in https://github.com/MilanCommunity/Milan-Backend/pull/39/commits/068ea0c201ad8fbbf715799b8e7d870d2f8137db

Screen Recording of API testing

https://github.com/MilanCommunity/Milan-Backend/assets/116940083/1abb20bd-4af7-4b17-93db-eff06a9f7bce