refactoring of cmaps, widgets, etc.

This commit is contained in:
2026-09-02 16:06:26 +02:00
parent 38f255c1a4
commit f0562a06cc
52 changed files with 3626 additions and 2642 deletions
+25
View File
@@ -0,0 +1,25 @@
/** Persist the people referenced by CMap concept tags through the wiki API. */
export class PeopleRepository {
constructor(api) {
this.api = api;
}
async all() {
const result = await this.api("/api/people");
return Array.isArray(result.people) ? result.people : [];
}
create(name) {
return this.api("/api/people", {
method: "POST",
body: JSON.stringify({ name })
});
}
update(person, active) {
return this.api(`/api/people/${person.id}`, {
method: "PUT",
body: JSON.stringify({ name: person.name, active })
});
}
}