1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 13:59:25 +00:00

Added Class.getParents

This commit is contained in:
2022-04-23 22:14:27 +00:00
parent 87d20a7926
commit 55f33bd467

View File

@@ -162,6 +162,17 @@ class Class {
return { ids: ids, objs: students };
}
async getParents() {
const parentInters = await Promise.all(this.students.map(s =>
s.getParents()));
const parents = [];
parentInters.forEach(pi => parents.push(...pi));
return parents;
}
getUsers(ids, type) {
const types = {
account: 'Account',