wadobo / socializa-api

Socializa is an interactive game for play it out of home
GNU Affero General Public License v3.0
1 stars 0 forks source link

Fixed API for character #15

Open Virako opened 5 years ago

Virako commented 5 years ago

Everything in character work bad. We need fixed character API, this API should be similar to things API.

For create NPC or Player, we should use deserializers, I think so we should create UserSerializer for create User (similar to Preferences in Game in file: game/serializers.py +20 ). The API call is the following:

#way1: user was created previously
params: {
  'user': user_pk
}

#way2: user will be created in deserializer
params: {
  'user': {
    'email': valid_email,
    'password': pwd
  }
}
Virako commented 5 years ago

PR: https://github.com/wadobo/socializa-api/pull/19