add feedback and report things
All checks were successful
deploy / build-and-deploy (/testvaro, /opt/website-test, website-test) (push) Successful in 22s
deploy / build-and-deploy (/varo, /opt/website, website) (push) Successful in 21s

This commit is contained in:
2025-06-21 14:45:39 +02:00
parent 9c49585873
commit ee8f595ecc
25 changed files with 898 additions and 57 deletions

View File

@ -22,6 +22,10 @@ export type EditStrikeReq = {
strikeReasonId: number;
};
export type GetStrikeByReportIdReq = {
reportId: number;
};
export type GetStrikesByTeamIdReq = {
teamId: number;
};
@ -42,6 +46,15 @@ export async function editStrike(db: Database, values: EditStrikeReq) {
});
}
export async function getStrikeByReportId(db: Database, values: GetStrikeByReportIdReq) {
return db.query.strike.findFirst({
with: {
strikeReason: true
},
where: eq(strike.reportId, values.reportId)
});
}
export async function getStrikesByTeamId(db: Database, values: GetStrikesByTeamIdReq) {
return db
.select({