- Rename error handler.

- Truncate errors.
- Better error tags, release version etc.
This commit is contained in:
Andras Bacsai
2022-02-14 09:28:37 +01:00
parent 70d3448110
commit b4a418dded
95 changed files with 260 additions and 226 deletions

View File

@@ -113,6 +113,13 @@ export async function getApplicationWebhook({ projectId, branch }) {
throw { status: 404, body: { message: e.message } };
}
}
export async function getApplicationById({ id }) {
const body = await prisma.application.findFirst({
where: { id }
});
return { ...body };
}
export async function getApplication({ id, teamId }) {
let body = await prisma.application.findFirst({
where: { id, teams: { some: { id: teamId } } },