MCPcopy
hub / github.com/IgnisDa/ryot / registerAdminUser

Function registerAdminUser

tests/src/utils.ts:239–255  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

237}
238
239export async function registerAdminUser(baseUrl: string) {
240 const client = getGraphqlClient(baseUrl);
241
242 const [userApiKey, userId] = await registerTestUser(baseUrl);
243
244 await client.request(UpdateUserDocument, {
245 input: {
246 userId,
247 lot: UserLot.Admin,
248 adminAccessToken: TEST_ADMIN_ACCESS_TOKEN,
249 },
250 });
251
252 console.log(`[Test Utils] User '${userId}' upgraded to admin successfully`);
253
254 return [userApiKey, userId] as const;
255}

Callers 1

user.test.tsFile · 0.90

Calls 3

getGraphqlClientFunction · 0.85
registerTestUserFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected