Skip to content

Commit

Permalink
fix(api): UserRateLimit schema (freeCodeCamp#55663)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeytonwilliams authored Aug 8, 2024
1 parent f54227d commit 7d84da1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ model Donation {
}

model UserRateLimit {
id String @id @default(auto()) @map("_id") @db.ObjectId
/// Field referred in an index, but found no data to define the type.
expirationDate Json?
id String @id @map("_id")
counter Int
expirationDate DateTime @db.Date
@@index([expirationDate], map: "expirationDate_1")
}
Expand Down
1 change: 1 addition & 0 deletions api/src/routes/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FastifyPluginCallback, FastifyRequest } from 'fastify';
// TODO(Post-MVP): use fastify-rate-limit instead of express-rate-limit
import rateLimit from 'express-rate-limit';
// @ts-expect-error - no types
import MongoStoreRL from 'rate-limit-mongo';
Expand Down

0 comments on commit 7d84da1

Please sign in to comment.