(securityId: string)
| 11 | export type Security = typeof security.$inferSelect; |
| 12 | |
| 13 | export const findSecurityById = async (securityId: string) => { |
| 14 | const application = await db.query.security.findFirst({ |
| 15 | where: eq(security.securityId, securityId), |
| 16 | }); |
| 17 | if (!application) { |
| 18 | throw new TRPCError({ |
| 19 | code: "NOT_FOUND", |
| 20 | message: "Security not found", |
| 21 | }); |
| 22 | } |
| 23 | return application; |
| 24 | }; |
| 25 | |
| 26 | export const createSecurity = async ( |
| 27 | data: z.infer<typeof apiCreateSecurity>, |
no outgoing calls
no test coverage detected