mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 18:20:09 +02:00
Add a rate limiter for the AI Error Assistant GitOrigin-RevId: d23abc4b3477d13b1bfd4d69db168458ac8c2e51
21 lines
418 B
JavaScript
21 lines
418 B
JavaScript
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
|