Skip to content

Commit

Permalink
Upgrade prisma/client and ioredis packages
Browse files Browse the repository at this point in the history
  • Loading branch information
blenderskool committed Dec 22, 2023
1 parent 34c39dd commit d5fef21
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 84 deletions.
3 changes: 1 addition & 2 deletions lib/internals/get-api-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function getApiRoute(req: NextApiRequest, res: NextApiRespo
const [apiId, ...remainingPath] = _path;
try {
// Fetch the API route details from DB (including project id and secret data)
const apiRoute = await prisma.apiRoute.findUnique({
const apiRoute = await prisma.apiRoute.findUniqueOrThrow({
where: {
id: apiId,
},
Expand All @@ -24,7 +24,6 @@ export default async function getApiRoute(req: NextApiRequest, res: NextApiRespo
},
},
},
rejectOnNotFound: true,
});

// Replace the request query with the remaining query params so that _path is not misused
Expand Down
2 changes: 1 addition & 1 deletion lib/middlewares/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function cacheRead(apiRoute: ApiRouteWithMiddlewares) {
.get(`${key}:headers`)
.ttl(`${key}:headers`)
.getBuffer(`${key}:response`)
.exec();
.exec() as [[Error, string], [Error, number], [Error, Buffer]];

if (!cachedHeadersError && !cacheAgeError && !cachedResultError && cachedHeaders) {
console.log("Cache middleware: HIT!");
Expand Down
147 changes: 70 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"@fontsource/inter": "^4.5.0",
"@fontsource/raleway": "^4.5.0",
"@heroicons/react": "^1.0.5",
"@prisma/client": "^3.4.2",
"@prisma/client": "^5.7.1",
"axios": "^0.24.0",
"copy-to-clipboard": "^3.3.1",
"cors": "^2.8.5",
"express-ipfilter": "^1.2.0",
"framer-motion": "^10.16.16",
"get-stream": "^6.0.1",
"ioredis": "^4.28.0",
"ioredis-mock": "^5.8.0",
"ioredis": "^5.3.2",
"ioredis-mock": "^8.9.0",
"json-mask": "^1.0.4",
"micromustache": "^8.0.3",
"nanoid": "^3.1.30",
Expand All @@ -38,7 +38,6 @@
"devDependencies": {
"@babel/core": "^7.16.0",
"@types/cors": "^2.8.12",
"@types/ioredis": "^4.28.1",
"@types/node": "^18.19.3",
"@types/react": "^18.2.45",
"@types/request-ip": "0.0.37",
Expand Down

1 comment on commit d5fef21

@vercel
Copy link

@vercel vercel bot commented on d5fef21 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

diode – ./

diode-git-main-blenderskool.vercel.app
diode.vercel.app
diode-blenderskool.vercel.app

Please sign in to comment.