Orthocorp / orthoverse-avatars

0 stars 0 forks source link

Alpha: Write updated information to database #41

Closed kf106 closed 1 year ago

kf106 commented 1 year ago

This should really be a lot simpler than it is turnout out to be, because getting information from a web page and writing it to a database is really the core of web2, but hey ho.

There are three bits of information that need writing:

The Save to Orthoverse button is only visible when you're logged in, and the database saving should ensure that only the authenticated user can alter their player record (of course).

Branch kf106/writeOrthoverse is a good place to start working from.

kf106 commented 1 year ago

I've just realized that image was meant to contain the avatar design stringified object, but I've used it for a base64 encoding of the player image. So we need a new column - design

kf106 commented 1 year ago

I have added the state variable transfer to the Download.tsx component so it is ready for the database write code. All the state variables should be in the correct state, so all that is needed (haha) is a database update command from the webpage.

See the useEffect() function for comments showing the right things to save.

web/src/components/Download/Download.tsx in branch origin/kf106/clientNameValidation

kf106 commented 1 year ago

Is now in branch develop

kf106 commented 1 year ago

Implemented with 676cbf2fbfae6a76a864714b504dc29261601bd7