preparing for member addition to project:

- implemented Autocomplete
- next up:
    - bubble up requested user
    - add as member
This commit is contained in:
2025-07-22 00:10:46 +02:00
parent 7eca9dd08e
commit 38bc00df29
2 changed files with 12 additions and 16 deletions

View File

@@ -28,14 +28,7 @@
});
if (resp.ok){
var json = await resp.json();
if (Array.isArray(json)) return json;
if (typeof json == 'object'){
let names = Object.values(json).map(user => user.name);
if (names.length > 10) names.length = 10;
return names;
}
console.warn('not an array:',json);
return [];
return Object.fromEntries(Object.values(json).map(user => [user.id,user.name]));
} else {
return [];
}