mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(api): UserRateLimit schema (#55663)
This commit is contained in:
committed by
GitHub
parent
f54227d581
commit
7d84da184a
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user