MCPcopy Create free account
hub / github.com/cometchat/cometchat-uikit-angular / createUser

Function createUser

e2e/helpers/seed.ts:71–80  ·  view source on GitHub ↗
(uid: string, name: string)

Source from the content-addressed store, hash-verified

69// ─── User operations ──────────────────────────────────────────────────────────
70
71async function createUser(uid: string, name: string): Promise<void> {
72 // Use PUT (upsert) — creates if not exists, updates if exists.
73 // This avoids 400 errors when users already exist from a previous run
74 // where permanent deletion wasn't supported.
75 await apiCall('PUT', `/users/${uid}`, {
76 name,
77 tags: [E2E_TAG],
78 deactivated: false, // reactivate if previously deactivated
79 });
80}
81
82async function deleteUserPermanently(uid: string): Promise<void> {
83 // Try permanent delete first; if not supported by the plan, deactivate instead

Callers 1

seedTestDataFunction · 0.70

Calls 1

apiCallFunction · 0.85

Tested by

no test coverage detected