User Management

This commit is contained in:
Oliver
2026-05-25 12:43:21 -03:00
parent 45cde10a21
commit 18ea3f19d6
3 changed files with 27 additions and 16 deletions
+7 -7
View File
@@ -43,16 +43,16 @@ GET <base_url>
Authorization: Basic <base64>
```
Response — n8n may return a JSON array, a single object, or NDJSON.
All three formats are handled by `parseJson()` (see below).
**Actual response shape** (confirmed via console):
```json
[
{ "Name": "Oliver", "id": 1, "createdAt": "...", "updatedAt": "..." },
{ "Name": "Luka", "id": 2, ... },
{ "Name": "Benni", "id": 3, ... }
]
{ "Name": ["Oliver", "Luka", "Benni"] }
```
`buildDropdown()` handles all three shapes n8n may return:
1. `{ Name: ["Oliver", "Luka", "Benni"] }` — single object, Name is an array (current)
2. `[ { Name: "Oliver" }, ... ]` — array of objects
3. `{ Name: "Oliver" }` — single object, Name is a string
### POST — submit scan
Called when the user presses Enter in the scan input.