(ids)
| 19 | } |
| 20 | |
| 21 | loadNames (ids) { |
| 22 | const toLoad = _.uniq((Array.from(ids).filter((id) => !namesCache[id]))) |
| 23 | if (!toLoad.length) { return false } |
| 24 | const jqxhrOptions = { |
| 25 | url: '/db/user/x/names', |
| 26 | type: 'POST', |
| 27 | data: { ids: toLoad }, |
| 28 | success: this.loadedNames |
| 29 | } |
| 30 | |
| 31 | return jqxhrOptions |
| 32 | } |
| 33 | |
| 34 | loadedNames (newNames) { |
| 35 | return _.extend(namesCache, newNames) |