MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / create

Method create

apps/api/src/api/users/users.service.ts:27–40  ·  view source on GitHub ↗
(data: ICreateUserData)

Source from the content-addressed store, hash-verified

25 }
26
27 async create(data: ICreateUserData): Promise<IUser> {
28 const [created] = await db.insert(users).values(data).returning();
29
30 if (!created) {
31 throw ApiErrors.internal("Failed to create user");
32 }
33
34 void auditLogService.record({
35 userId: created.id,
36 action: AUDIT_ACTIONS.USER_CREATED,
37 });
38
39 return created;
40 }
41
42 async getProfile(userId: string): Promise<IPublicUserProfile> {
43 const user = await this.getById(userId);

Callers 12

constructorMethod · 0.45
chatMethod · 0.45
chatMethod · 0.45
createCheckoutSessionMethod · 0.45
createPortalSessionMethod · 0.45
isRecord.test.tsFile · 0.45

Calls 1

recordMethod · 0.45

Tested by

no test coverage detected