mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
feat: add terms acceptance timestamp tracking and migration script
This commit is contained in:
parent
3e8ef24cfa
commit
44f7aad007
10 changed files with 134 additions and 4 deletions
|
|
@ -21,7 +21,10 @@ const connect = require('./connect');
|
|||
}
|
||||
|
||||
try {
|
||||
const result = await User.updateMany({}, { $set: { termsAccepted: false } });
|
||||
const result = await User.updateMany(
|
||||
{},
|
||||
{ $set: { termsAccepted: false, termsAcceptedAt: null } },
|
||||
);
|
||||
console.green(`Updated ${result.modifiedCount} user(s).`);
|
||||
} catch (error) {
|
||||
console.red('Error resetting terms acceptance:', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue