feat: add roles documentation and database configuration files while removing deployment guide
All checks were successful
On Push to Main / test (push) Successful in 38s
On Push to Main / publish (push) Successful in 1m4s
On Push to Main / deploy-dev (push) Successful in 1m38s

This commit is contained in:
RaymondVerhoef
2026-05-17 13:39:58 +02:00
parent 271baba860
commit 1ba647fecd
4 changed files with 333 additions and 138 deletions

View File

@@ -8,13 +8,13 @@ export async function getTopics() {
export async function saveTopics(topics) {
const existing = await pb.collection('topics').getFullList({ fields: 'id' });
await Promise.all(existing.map(r => pb.collection('topics').delete(r.id)));
await Promise.all(existing.map(r => pb.collection('topics').delete(r.id, { requestKey: null })));
return Promise.all(topics.map(t => pb.collection('topics').create({
id: t.id,
label: t.label,
type: t.type,
description: t.description,
})));
}, { requestKey: null })));
}
export async function upsertTopic(topic) {
@@ -34,8 +34,8 @@ export async function getRelations() {
export async function saveRelations(relations) {
const existing = await pb.collection('relations').getFullList({ fields: 'id' });
await Promise.all(existing.map(r => pb.collection('relations').delete(r.id)));
return Promise.all(relations.map(r => pb.collection('relations').create(r)));
await Promise.all(existing.map(r => pb.collection('relations').delete(r.id, { requestKey: null })));
return Promise.all(relations.map(r => pb.collection('relations').create(r, { requestKey: null })));
}
export async function addRelation(relation) {
@@ -46,7 +46,7 @@ export async function removeRelation(source, target, type) {
const records = await pb.collection('relations').getFullList({
filter: `source="${source}" && target="${target}" && type="${type}"`,
});
return Promise.all(records.map(r => pb.collection('relations').delete(r.id)));
return Promise.all(records.map(r => pb.collection('relations').delete(r.id, { requestKey: null })));
}
// ── Content ──────────────────────────────────────────────────────────────────