KevinDelao / Cloud-Backend-Project

0 stars 0 forks source link

endpoint to initialize / save game result data #11

Closed jsunthon closed 4 years ago

jsunthon commented 4 years ago

Calibration stage - data from the HTC vive sensors Score Rounds (3 Rounds per patient) words spelled correctly total words total wrong words spelled objects hit baseline speed

jsunthon commented 4 years ago

steps might be

1) CREATE game result with calibration stage { "calibrationStage": ASDASDAD }

2) then the endpoint returns a unique ID

{ "gameId": :ASDASDASD }

then they can use this unique id as a session / game id when they pass that into the data request

KevinDelao commented 4 years ago

added enitity, service, controller for gamedata

jsunthon commented 4 years ago

example of a PATCH

/v1/game-session/{id}, where {id} is the id of the game session

ex:

PATCH /v1/game-session/1

{ "objectHit": 1000, "wordsSpellednIncorrectly": 50 }

in the service, you'd look up the game session with id of 1, and if it exists, use the setters to modify these select fields, then gamesessionrep.save(updatedgameSession)