fix: Complete schema adaptation for all tool modules

- auth.ts: Use suspendedAt instead of isSuspended, role instead of isAdmin
- comments.ts: Use role='admin' for admin user queries
- documents.ts: Use suspendedAt IS NULL for active users
- events.ts: Return actorRole instead of actorIsAdmin
- shares.ts: Use role='admin' for admin user queries

All queries validated against Outline v0.78 schema (10/10 tests pass).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 13:34:53 +00:00
parent 6f5d17516b
commit 7116722d73
5 changed files with 10 additions and 10 deletions

View File

@@ -217,7 +217,7 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
// Obter primeiro utilizador activo como createdById (necessário)
const userResult = await pgClient.query(
`SELECT id FROM users WHERE "deletedAt" IS NULL AND "isSuspended" = false LIMIT 1`
`SELECT id FROM users WHERE "deletedAt" IS NULL AND "suspendedAt" IS NULL LIMIT 1`
);
if (userResult.rows.length === 0) {