Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 1x 1x 1x 1x 15x 15x 1x 1x 5x 5x 5x 5x 5x 5x 5x 5x 1x 1x 5x 5x 5x 5x 5x 5x 5x 5x 1x 1x 5x 5x 5x 5x 5x 5x 5x 5x 1x | export default class Teacher {
#client;
constructor(client) {
this.#client = client;
}
absences() {
const base = '/teacher/absences';
return {
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
create: (data) => this.#client.put(base, data),
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
delete: (id) => this.#client.del(`${base}/${id}`),
};
}
configSets() {
const base = '/teacher/config-sets';
return {
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
create: (data) => this.#client.put(base, data),
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
delete: (id) => this.#client.del(`${base}/${id}`),
};
}
configs() {
const base = '/teacher/configs';
return {
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
create: (data) => this.#client.put(base, data),
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
delete: (id) => this.#client.del(`${base}/${id}`),
};
}
}
|