9ff4c0dbd5
* Setup project-wide prettier * Remove old workspace file * Remove old debugging directives * New top-level .prettierignore * Updated Prettier config settings * Contrubuting guide: Fix for some bad code blocks * Added more ignores * Improved the format script command * printWidth set to 100 * Formatted entire repo (pnpm run format)
21 lines
436 B
TypeScript
21 lines
436 B
TypeScript
import { prisma } from "~/db.server";
|
|
import { Prettify } from "~/lib.es5";
|
|
|
|
export type ExtendedEndpoint = Prettify<Awaited<ReturnType<typeof findEndpoint>>>;
|
|
|
|
export async function findEndpoint(id: string) {
|
|
return await prisma.endpoint.findUniqueOrThrow({
|
|
where: {
|
|
id,
|
|
},
|
|
include: {
|
|
environment: {
|
|
include: {
|
|
project: true,
|
|
organization: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|