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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user