fix: address CodeRabbit review issues
- redis-handler: add TLS_CA and USERNAME env support matching core client - connection.ts: fix Boolean() truthy bug (CI="false" was disabling Redis) - channel.ts: add in-memory lock for single-instance fallback mode - channel-subscription-tracker: lazy-init subscriber client - board.ts: invalidate user cache on board delete for home-board users - .env.example: document REDIS_CACHE_DB vs DATABASE_INDEX collision risk - CLI docs: fix docker exec command (remove /bin/bash prefix) - Docker docs: fix docker rm -f and docker ps -a for stopped containers
This commit is contained in:
8 files changed
+39
-12
No files matched your search
@@ -648,8 +648,16 @@ export const boardRouter = createTRPCRouter({
|
||||
columns: { name: true },
|
||||
});
|
||||
|
||||
const affectedUsers = await ctx.db.query.users.findMany({
|
||||
columns: { id: true },
|
||||
where: eq(users.homeBoardId, input.id),
|
||||
});
|
||||
|
||||
await ctx.db.delete(boards).where(eq(boards.id, input.id));
|
||||
|
||||
for (const user of affectedUsers) {
|
||||
invalidateUserCache(user.id);
|
||||
}
|
||||
invalidateBoardCache(input.id, existingBoard?.name);
|
||||
}),
|
||||
setHomeBoard: protectedProcedure
|
||||
|
||||
Reference in new issue
Block a user