fix nkode api; username should be specified at the beginning of the enrollment

This commit is contained in:
2025-03-24 15:24:53 -05:00
parent 1846dc1065
commit 3a9fadfc03
10 changed files with 281 additions and 199 deletions

View File

@@ -12,26 +12,26 @@ sequenceDiagram
Server->>Server: Create Signup Session
Note over User,Server: Set nKode
Server-->>-Client: signup_session_id, set_keypad, icons
Note left of Server: signup_session_id:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64
Note left of Server: set_keypad:<br/>Key 0: [ 9 29 3 49 50 25]<br/>Key 1: [27 2 12 22 14 16]<br/>Key 2: [36 47 21 13 23 7]<br/>Key 3: [45 11 30 4 32 43]<br/>Key 4: [18 20 39 40 41 52]<br/>Key 5: [ 0 38 48 31 5 34]<br/>
Note left of Server: signup_session_id:<br/>1334d391-3c8a-431a-8186-e91b29d42750
Note left of Server: set_keypad:<br/>Key 0: [18 2 39 13 23 16]<br/>Key 1: [36 20 21 49 5 43]<br/>Key 2: [ 0 47 48 4 50 25]<br/>Key 3: [27 38 12 40 32 52]<br/>Key 4: [45 29 3 31 41 34]<br/>Key 5: [ 9 11 30 22 14 7]<br/>
Note left of Server: Icons:<br/>[🍎,🍏,🍊,🍋,🍌,🍉<br/>🍇,🍓,🍒,🍑,🥭,🍍<br/>🥥,🥝,🍅,🍆,🥑,🥕<br/>🌽,🥔,🍠,🥐,🥖,🥨<br/>🥯,🥞,🧀,🍖,🍗,🥚<br/>🍔,🍟,🍕,🌭,🥪,🌮<br/>🌯,🍣,🍤,🍙,🍚,🍜<br/>🍲,🍛,🍱,🥟,🍦,🍧<br/>🍨,🍩,🍪,🎂,🍰,🧁]
Client->>Client: Order Icons by keypad
Client->>User: Display Keypad
Note left of Client: Key 0: ['🍑' '🥚' '🍋' '🍩' '🍪' '🥞']<br/>Key 1: ['🍖' '🍊' '🥥' '🥖' '🍅' '🥑']<br/>Key 2: ['🌯' '🍧' '🥐' '🥝' '🥨' '🍓']<br/>Key 3: ['🥟' '🍍' '🍔' '🍌' '🍕' '🍛']<br/>Key 4: ['🌽' '🍠' '🍙' '🍚' '🍜' '🍰']<br/>Key 5: ['🍎' '🍤' '🍨' '🍟' '🍉' '🥪']<br/>
Note left of User: User icons: ['🌯' '🍖' '🍰' '🍓']
User->>Client: Set Key Selection: [2, 1, 4, 2]
Client->>+Server: Set nKode:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64<br/>[2, 1, 4, 2]
Note left of Client: Key 0: ['🌽' '🍊' '🍙' '🥝' '🥨' '🥑']<br/>Key 1: ['🌯' '🍠' '🥐' '🍩' '🍉' '🍛']<br/>Key 2: ['🍎' '🍧' '🍨' '🍌' '🍪' '🥞']<br/>Key 3: ['🍖' '🍤' '🥥' '🍚' '🍕' '🍰']<br/>Key 4: ['🥟' '🥚' '🍋' '🍟' '🍜' '🥪']<br/>Key 5: ['🍑' '🍍' '🍔' '🥖' '🍅' '🍓']<br/>
Note left of User: User icons: ['🍌' '🍟' '🌽' '🥝']
User->>Client: Set Key Selection: [2, 4, 0, 0]
Client->>+Server: Set nKode:<br/>1334d391-3c8a-431a-8186-e91b29d42750<br/>[2, 4, 0, 0]
Server->>Server: Disperse Set Keypad
Note over User,Server: Confirm nKode
Server-->>-Client: signup_session_id, confirm_keypad, icons
Note left of Server: signup_session_id:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64
Note left of Server: confirm_keypad:<br/>Key 0: [27 47 39 4 5 25]<br/>Key 1: [45 20 48 49 14 7]<br/>Key 2: [ 9 38 12 13 32 52]<br/>Key 3: [36 2 30 40 50 34]<br/>Key 4: [18 11 3 31 23 16]<br/>Key 5: [ 0 29 21 22 41 43]<br/>
Note left of Server: signup_session_id:<br/>1334d391-3c8a-431a-8186-e91b29d42750
Note left of Server: confirm_keypad:<br/>Key 0: [27 47 3 13 14 43]<br/>Key 1: [ 0 29 30 49 23 52]<br/>Key 2: [45 11 39 40 5 25]<br/>Key 3: [ 9 2 21 4 32 34]<br/>Key 4: [18 20 12 31 50 7]<br/>Key 5: [36 38 48 22 41 16]<br/>
Client->>Client: Order Icons by keypad
Client->>User: Display Keypad
Note left of Client: Key 0: ['🍖' '🍧' '🍙' '🍌' '🍉' '🥞']<br/>Key 1: ['🥟' '🍠' '🍨' '🍩' '🍅' '🍓']<br/>Key 2: ['🍑' '🍤' '🥥' '🥝' '🍕' '🍰']<br/>Key 3: ['🌯' '🍊' '🍔' '🍚' '🍪' '🥪']<br/>Key 4: ['🌽' '🍍' '🍋' '🍟' '🥨' '🥑']<br/>Key 5: ['🍎' '🥚' '🥐' '🥖' '🍜' '🍛']<br/>
Note left of User: User icons: ['🌯' '🍖' '🍰' '🍓']
User->>Client: Key Selection: [3, 0, 2, 1]
Client->>+Server: Confirm nKode:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64<br/>[3, 0, 2, 1]
Note left of Client: Key 0: ['🍖' '🍧' '🍋' '🥝' '🍅' '🍛']<br/>Key 1: ['🍎' '🥚' '🍔' '🍩' '🥨' '🍰']<br/>Key 2: ['🥟' '🍍' '🍙' '🍚' '🍉' '🥞']<br/>Key 3: ['🍑' '🍊' '🥐' '🍌' '🍕' '🥪']<br/>Key 4: ['🌽' '🍠' '🥥' '🍟' '🍪' '🍓']<br/>Key 5: ['🌯' '🍤' '🍨' '🥖' '🍜' '🥑']<br/>
Note left of User: User icons: ['🍌' '🍟' '🌽' '🥝']
User->>Client: Key Selection: [3, 4, 4, 0]
Client->>+Server: Confirm nKode:<br/>1334d391-3c8a-431a-8186-e91b29d42750<br/>[3, 4, 4, 0]
Server->>Server: Create User
Server-->>-Client: Success
```