♻️ Remove backend package (#1305)

This commit is contained in:
Luke Vella 2024-09-05 18:27:12 +01:00 committed by GitHub
parent 12af4d9c84
commit d40d4b27e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 29 additions and 102 deletions

View file

@ -0,0 +1,17 @@
import { prisma } from "@rallly/database";
import { possiblyPublicProcedure, router } from "../trpc";
export const dashboard = router({
info: possiblyPublicProcedure.query(async ({ ctx }) => {
const activePollCount = await prisma.poll.count({
where: {
userId: ctx.user.id,
status: "live",
deleted: false, // TODO (Luke Vella) [2024-06-16]: We should add deleted/cancelled to the status enum
},
});
return { activePollCount };
}),
});