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:
@@ -260,7 +260,7 @@ const createShare: BaseTool<CreateShareArgs> = {
|
||||
|
||||
// Get first admin user as creator
|
||||
const userQuery = await pgClient.query(
|
||||
'SELECT id FROM users WHERE "isAdmin" = true AND "deletedAt" IS NULL LIMIT 1'
|
||||
`SELECT id FROM users WHERE role = 'admin' AND "deletedAt" IS NULL LIMIT 1`
|
||||
);
|
||||
|
||||
if (userQuery.rows.length === 0) {
|
||||
@@ -416,7 +416,7 @@ const revokeShare: BaseTool<GetShareArgs> = {
|
||||
|
||||
// Get first admin user as revoker
|
||||
const userQuery = await pgClient.query(
|
||||
'SELECT id FROM users WHERE "isAdmin" = true AND "deletedAt" IS NULL LIMIT 1'
|
||||
`SELECT id FROM users WHERE role = 'admin' AND "deletedAt" IS NULL LIMIT 1`
|
||||
);
|
||||
|
||||
if (userQuery.rows.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user