Closed eanker closed 9 years ago
@Azkle is this an acceptable schema for you?
Looks good, I think this will work.
Why would we want to have an end point to award points? Isn't this guarded by the system?
I don't think POST-ing points is valid as it can indeed be misused, however the GET is reasonable. You only want to award points on the backend for example in the SongAPI.toclassify() call
Since security isn't a critical factor in this system (contextproject, not a live product), I would like to keep this endpoint open for testability purposes. I do agree this shouldn't be called by the system in everyday usage, but testing achievements for example may be easier this way.
@GET - localhost:8080/api/users/{id}/points -> returns integer value of points @POST - localhost:8080/api/users/{id}/points?amount=X -> updates value, X defaults to 0