preparing for member addition to project:
- implemented Autocomplete
- next up:
- bubble up requested user
- add as member
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user