mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
✨ RateLimit Bucket
This commit is contained in:
parent
229e741bfd
commit
e13bdc3127
@ -9,6 +9,7 @@ export interface Bucket {
|
||||
user: string;
|
||||
hits: number;
|
||||
blocked: boolean;
|
||||
created_at: Date;
|
||||
}
|
||||
|
||||
export interface BucketDocument extends Bucket, Document {
|
||||
@ -20,6 +21,7 @@ export const BucketSchema = new Schema({
|
||||
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 },
|
||||
created_at: { type: Date, required: true },
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
|
Loading…
Reference in New Issue
Block a user