rename communityEcology → board across backend

Model, schemas, API routes, activity log, and all server handlers
updated. Old ecology/ and community-ecology routes removed, new
board/ routes added. Tests updated and new board-suggestions tests
written (10 cases).
This commit is contained in:
Jennie Robinson Faber 2026-04-14 12:00:15 +01:00
parent 59d6e97787
commit 091ec58073
20 changed files with 405 additions and 80 deletions

View file

@ -30,7 +30,7 @@ export default defineEventHandler(async (event) => {
status: "active",
})
.select(
"name pronouns timeZone avatar studio bio location socialLinks privacy circle craftTags communityEcology createdAt memberNumber",
"name pronouns timeZone avatar studio bio location socialLinks privacy circle craftTags board createdAt memberNumber",
)
.lean();
@ -70,18 +70,18 @@ export default defineEventHandler(async (event) => {
if (isVisible("socialLinks")) filtered.socialLinks = member.socialLinks;
if (isVisible("craftTags")) filtered.craftTags = member.craftTags;
if (isVisible("communityEcology")) {
const ecology = member.communityEcology || {};
filtered.communityEcology = {
topics: ecology.topics,
offerPeerSupport: ecology.offerPeerSupport,
availability: ecology.availability,
details: ecology.details,
if (isVisible("board")) {
const board = member.board || {};
filtered.board = {
topics: board.topics,
offerPeerSupport: board.offerPeerSupport,
availability: board.availability,
details: board.details,
// Contact-in-place: surface the handle + personal message only when
// the member has explicitly opted into peer support.
...(ecology.offerPeerSupport && {
slackHandle: ecology.slackHandle,
personalMessage: ecology.personalMessage,
...(board.offerPeerSupport && {
slackHandle: board.slackHandle,
personalMessage: board.personalMessage,
}),
};
}