diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 13:00:16 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 13:00:16 +0200 |
commit | 11353dabfd95df510d7f054ed4acbd28c8bb4e1f (patch) | |
tree | 33eca0beeb91d6efdb7730c0964644c484e9ebf9 /rtc/src/models/RateLimit.ts | |
parent | rename @fosscord/server-util to -> @fosscord/util (diff) | |
download | server-11353dabfd95df510d7f054ed4acbd28c8bb4e1f.tar.xz |
cleanup rtc
Diffstat (limited to 'rtc/src/models/RateLimit.ts')
-rw-r--r-- | rtc/src/models/RateLimit.ts | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/rtc/src/models/RateLimit.ts b/rtc/src/models/RateLimit.ts deleted file mode 100644 index 6a0e1ffd..00000000 --- a/rtc/src/models/RateLimit.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Schema, Document, Types } from "mongoose"; -import db from "../util/Database"; - -export interface Bucket { - id: "global" | "error" | string; // channel_239842397 | guild_238927349823 | webhook_238923423498 - user_id: string; - hits: number; - blocked: boolean; - expires_at: Date; -} - -export interface BucketDocument extends Bucket, Document { - id: string; -} - -export const BucketSchema = new Schema({ - id: { type: String, required: true }, - user_id: { type: String, required: true }, // bot, user, oauth_application, webhook - hits: { type: Number, required: true }, // Number of times the user hit this bucket - blocked: { type: Boolean, required: true }, - expires_at: { type: Date, required: true }, -}); - -// @ts-ignore -export const BucketModel = db.model<BucketDocument>("Bucket", BucketSchema, "ratelimits"); |