giftxtrade / api Goto Github PK
View Code? Open in Web Editor NEWGiftTrade RESTful API built with Go
Home Page: https://giftxtradeapi.com
License: Other
GiftTrade RESTful API built with Go
Home Page: https://giftxtradeapi.com
License: Other
The limit query on /products
can accept any numeric value for the limit
query. This can lead to crashes as it can be called with a very large value and this significantly slow or even crash the server. See:
api/src/products/products.controller.ts
Line 25 in c1cfc37
api/src/services/event_service.go
Line 61 in 583fe04
Patch
method currently requires the user of the method to fetch the proper event object. However, I think it would be much better to have the method take an id
parameter and change the event
parameter to output
. This way we can use the id
parameter to fetch the event and then the updated value can be "returned" using output
.
func (service *EventService) Patch(id string, user *types.User, input *types.CreateEvent, output *types.Event) (bool, error)
api/src/events/events.controller.ts
Line 42 in e917ba5
The current way to generate draws is through making a POST
request to /draws
withe the event id as the body, and then calling /draws/confirm/:eventId
. The problem with this approach, as noted in issue #3 is that the current algorithm is too slow and does not generate all possible combinations.
Instead, I propose that these draws be generated on the client side and sent to /draws/confirm/:eventId
with a POST
request with the body holding all draws. This will make for faster draw generation and also allow organizers to manually create pairings.
api/src/events/events.service.ts
Line 91 in b189f30
Emailing participants that have been added manually will help them find out that they've been added to an event. This feature will also be helpful when we implement the "clone event" feature in the future.
api/src/draws/draws.service.ts
Line 90 in b189f30
The current algorithm is very inefficient, and may cause the event loop to be blocked unnecessarily. In addition, the algorithm also doesn't generate all possible valid combinations.
As the title suggests, the repo is lacking of any testing. It's crucial to make sure that the API is functioning properly and the best way to check is through running unit tests.
api/src/products/products.controller.ts
Line 53 in 56ea366
README.md
is missing instructions on setting up the auth-tokens.json
file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.