mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Merge pull request #18697 from overleaf/dp-ai-rate-limit
Add a rate limiter for the AI Error Assistant GitOrigin-RevId: d23abc4b3477d13b1bfd4d69db168458ac8c2e51
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const mongoose = require('../infrastructure/Mongoose')
|
||||
const { Schema } = mongoose
|
||||
|
||||
const Usage = new Schema({
|
||||
usage: { type: Number },
|
||||
periodStart: { type: Date },
|
||||
})
|
||||
|
||||
const UserFeatureUsageSchema = new Schema({
|
||||
features: {
|
||||
aiErrorAssistant: Usage,
|
||||
},
|
||||
})
|
||||
|
||||
exports.UserFeatureUsage = mongoose.model(
|
||||
'UserFeatureUsage',
|
||||
UserFeatureUsageSchema
|
||||
)
|
||||
|
||||
exports.UserFeatureUsageSchema = UserFeatureUsageSchema
|
||||
Reference in New Issue
Block a user