-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mise à jour des dépendances de Mongo #4740
base: main
Are you sure you want to change the base?
Conversation
jenovateurs
commented
Nov 19, 2024
- Mongodb : https://github.com/mongodb/node-mongodb-native/releases
- Mongoose : https://github.com/Automattic/mongoose/blob/8.8.2/CHANGELOG.md
Le dernier check non-valide correspond à CodeQL (système d'IA de review) qui suggère d'ajouter un rate limit de partout. |
Oui, c'est ok, tu peux les retirer sur Github en cochant la case pour dire que c'est des faux positifs |
} | ||
|
||
function attachAccessCookie(req: Request, res, next?) { | ||
const cookiesParameters = { | ||
maxAge: 7 * 24 * 3600 * 1000, | ||
maxAge: 604800000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'aurais ajouté un commentaire sur cette constante ou nommé de manière explicite dans une constante globale
const SurveyModel = mongoose.model<Survey>("Survey", SurveySchema) | ||
FollowupSchema.method( | ||
"addSurveyIfMissing", | ||
async function (surveyType: SurveyType): Promise<Survey> { | ||
let survey = this.surveys.find((survey) => survey.type === surveyType) | ||
if (!survey) { | ||
survey = await this.surveys.create({ type: surveyType }) | ||
survey = new SurveyModel({ type: surveyType }) | ||
this.surveys.push(survey) | ||
await this.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu as testé cette partie manuellement pour vérifier que c'était iso-fonctionnel ?
Ce serait bien d'ajouter un test ici je trouve