MCPcopy
hub / github.com/codeaashu/claude-code / createAdminRequest

Function createAdminRequest

src/services/api/adminRequests.ts:49–64  ·  view source on GitHub ↗
(
  params: AdminRequestCreateParams,
)

Source from the content-addressed store, hash-verified

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