1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-22 11:17:01 +00:00

Merge pull request from overleaf/ta-galileo-feedback-collect

Collect Galileo Feedbacks in Mongo

GitOrigin-RevId: fe1589ab568ff1bc4de812e205d34e696f3b3a31
This commit is contained in:
Timothée Alby 2022-10-26 14:23:56 +02:00 committed by Copybot
parent 6f50f6da3f
commit ed17421b5d

View file

@ -0,0 +1,21 @@
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const { ObjectId } = Schema
const FeedbackSchema = new Schema({
userId: {
type: ObjectId,
ref: 'User',
},
source: String,
createdAt: {
type: Date,
default() {
return new Date()
},
},
data: {},
})
exports.Feedback = mongoose.model('Feedback', FeedbackSchema)
exports.FeedbackSchema = FeedbackSchema