()
| 26 | |
| 27 | ////// Actions /////// |
| 28 | export const completeOnboarding = async (): Promise<{ success: boolean } | ServiceError> => sew(() => |
| 29 | withAuth(async ({ org, prisma }) => { |
| 30 | await prisma.org.update({ |
| 31 | where: { id: org.id }, |
| 32 | data: { |
| 33 | isOnboarded: true, |
| 34 | } |
| 35 | }); |
| 36 | |
| 37 | return { |
| 38 | success: true, |
| 39 | } |
| 40 | })); |
| 41 | |
| 42 | export const createApiKey = async (name: string): Promise<{ key: string } | ServiceError> => sew(() => |
| 43 | withAuth(async ({ org, user, role, prisma }) => { |
no test coverage detected