File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Request , Response } from "express" ;
22import prismaClient from "../../../prismaClient.js" ;
33import z from "zod" ;
4- import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library" ;
4+ import { Prisma } from "@prisma/client" ;
5+ const { PrismaClientKnownRequestError } = Prisma ;
56import { kv } from "../../../redisClient.js" ;
67
78export const approveTeamEmail = async (
89 req : Request ,
9- res : Response ,
10+ res : Response
1011) : Promise < void > => {
1112 try {
1213 const params = z
Original file line number Diff line number Diff line change @@ -12,14 +12,16 @@ import {
1212 FieldTraversal ,
1313 Position ,
1414 MatchType ,
15+ Prisma ,
1516 RobotRole ,
1617 ClimbPosition ,
1718 ClimbSide ,
1819 EndgameClimb ,
1920} from "@prisma/client" ;
2021import { sendWarningToSlack } from "../../slack/sendWarningNotification.js" ;
2122import { invalidateCache } from "../../../lib/clearCache.js" ;
22- import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library" ;
23+
24+ const { PrismaClientKnownRequestError } = Prisma ;
2325
2426export const checkForInvalidEvents = ( events : any [ ] [ ] ) : string [ ] | null => {
2527 let inEvent : string | null = null ;
Original file line number Diff line number Diff line change @@ -14,23 +14,27 @@ import {
1414 IntakeType ,
1515 MatchType ,
1616 Position ,
17+ Prisma ,
1718 RobotRole ,
1819 FieldTraversal ,
1920 ClimbPosition ,
2021 ClimbSide ,
2122} from "@prisma/client" ;
2223import { invalidateCache } from "../../../lib/clearCache.js" ;
2324import { sendWarningToSlack } from "../../slack/sendWarningNotification.js" ;
24- import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library" ;
2525import { checkForInvalidEvents } from "./addScoutReport.js" ;
2626
27+ const { PrismaClientKnownRequestError } = Prisma ;
28+
2729export const addScoutReportDashboard = async (
2830 req : AuthenticatedRequest ,
29- res : Response ,
31+ res : Response
3032) : Promise < void > => {
3133 try {
3234 if ( req . tokenType === "apiKey" ) {
33- res . status ( 403 ) . json ( { error : "This action cannot be performed using an API key" } ) ;
35+ res
36+ . status ( 403 )
37+ . json ( { error : "This action cannot be performed using an API key" } ) ;
3438 return ;
3539 }
3640
@@ -144,7 +148,7 @@ export const addScoutReportDashboard = async (
144148 // Invalidate cached analyses
145149 invalidateCache (
146150 paramsScoutReport . teamNumber ,
147- paramsScoutReport . tournamentKey ,
151+ paramsScoutReport . tournamentKey
148152 ) ;
149153
150154 const scoutReportUuid = paramsScoutReport . uuid ;
@@ -225,7 +229,7 @@ export const addScoutReportDashboard = async (
225229 matchRow . matchNumber ,
226230 matchRow . teamNumber ,
227231 matchRow . tournamentKey ,
228- paramsScoutReport . uuid ,
232+ paramsScoutReport . uuid
229233 ) ;
230234 }
231235
You can’t perform that action at this time.
0 commit comments