sungatuly22 / tournament-service

0 stars 0 forks source link

Add responses for user handlers #17

Open itechdima opened 3 years ago

itechdima commented 3 years ago

Acceptance criteria:

itechdima commented 3 years ago

Hints: server/user.go: Add convert function: func FromDomain(u pkg.User) User {return User{...}} server/server.go: use convert function and json marshal it server/server.go: w.Write(data)

for status codes: server/server.go: for successful update and delete w.WriteHeader(http.StatusOK), for successful create: 200, for error: 500