MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / createAdminRequest

Function createAdminRequest

source code/services/api/adminRequests.ts:51–66  ·  view source on GitHub ↗
(
  params: AdminRequestCreateParams,
)

Source from the content-addressed store, hash-verified

49 * returns the existing request instead of creating a new one.
50 */
51export async function createAdminRequest(
52 params: AdminRequestCreateParams,
53): Promise<AdminRequest> {
54 const { accessToken, orgUUID } = await prepareApiRequest()
55
56 const headers = {
57 ...getOAuthHeaders(accessToken),
58 'x-organization-uuid': orgUUID,
59 }
60
61 const url = `${getOauthConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/admin_requests`
62
63 const response = await axios.post<AdminRequest>(url, params, { headers })
64
65 return response.data
66}
67
68/**
69 * Get pending admin request of a specific type for the current user.

Callers 1

runExtraUsageFunction · 0.85

Calls 3

prepareApiRequestFunction · 0.85
getOAuthHeadersFunction · 0.85
getOauthConfigFunction · 0.85

Tested by

no test coverage detected