fix: webhook process (#45385)
* fix: token rework functional fix: clean up fix: more clean up fix: more clean up fix: add widget back to settings fix: fix: fix: cypress Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> fix: use flash enum * chore: rename webhookToken -> userToken fix: add translations I forgot to save * fix: add missing tones for flash messages * fix: node test
This commit is contained in:
@ -153,7 +153,20 @@ MongoClient.connect(MONGOHQ_URL, { useNewUrlParser: true }, (err, client) => {
|
||||
const db = client.db('freecodecamp');
|
||||
const user = db.collection('user');
|
||||
|
||||
const dropUserTokens = async function () {
|
||||
await db.collection('UserToken').deleteMany({
|
||||
userId: {
|
||||
$in: [
|
||||
ObjectId('5fa2db00a25c1c1fa49ce067'),
|
||||
ObjectId('5bd30e0f1caf6ac3ddddddb5'),
|
||||
ObjectId('5bd30e0f1caf6ac3ddddddb9')
|
||||
]
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (process.argv[2] === 'certUser') {
|
||||
dropUserTokens();
|
||||
user.deleteMany(
|
||||
{
|
||||
_id: {
|
||||
@ -179,6 +192,7 @@ MongoClient.connect(MONGOHQ_URL, { useNewUrlParser: true }, (err, client) => {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
dropUserTokens();
|
||||
user.deleteMany(
|
||||
{
|
||||
_id: {
|
||||
|
Reference in New Issue
Block a user