MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / approveRequest

Method approveRequest

server/src/db/join-request-db.ts:119–136  ·  view source on GitHub ↗

* Approve a join request

(id: string, handled_by_user_id: string)

Source from the content-addressed store, hash-verified

117 * Approve a join request
118 */
119 async approveRequest(id: string, handled_by_user_id: string): Promise<JoinRequest | null> {
120 const result = await query<JoinRequest>(
121 `UPDATE organization_join_requests
122 SET status = 'approved', handled_by_user_id = $2, handled_at = NOW(), updated_at = NOW()
123 WHERE id = $1 AND status = 'pending'
124 RETURNING *`,
125 [id, handled_by_user_id]
126 );
127
128 if (result.rows[0]) {
129 logger.info({
130 requestId: id,
131 handledBy: handled_by_user_id
132 }, 'Join request approved');
133 }
134
135 return result.rows[0] || null;
136 }
137
138 /**
139 * Reject a join request

Callers 2

setupAuthRoutesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected