Skip to content
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

Sync dev to main #2054

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make changes to add description to groups (#2052)
Co-authored-by: Vinit khandal <[email protected]>
  • Loading branch information
pallabez and vinit717 committed Jun 29, 2024
commit 2f141ff2855c26c2b86e92c1bb2b32e4434daec3
1 change: 1 addition & 0 deletions controllers/discordactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
const groupRoleData = {
rolename,
createdBy: req.userData.id,
description: req.body.description || "",
date: admin.firestore.Timestamp.fromDate(new Date()),
};

Expand Down Expand Up @@ -290,7 +291,7 @@
const nickNameUpdatedUsers = [];
let counter = 0;
for (let i = 0; i < usersToBeEffected.length; i++) {
const { discordId, username, first_name: firstName } = usersToBeEffected[i];

Check warning on line 294 in controllers/discordactions.js

View workflow job for this annotation

GitHub Actions / build (20.11.x)

Variable Assigned to Object Injection Sink
try {
if (counter % 10 === 0 && counter !== 0) {
await new Promise((resolve) => setTimeout(resolve, 5500));
Expand All @@ -306,7 +307,7 @@
if (message) {
counter++;
totalNicknamesUpdated.count++;
nickNameUpdatedUsers.push(usersToBeEffected[i].id);

Check warning on line 310 in controllers/discordactions.js

View workflow job for this annotation

GitHub Actions / build (20.11.x)

Generic Object Injection Sink
}
}
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions middlewares/validators/discordactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { validateMillisecondsTimestamp } = require("./utils");
const validateGroupRoleBody = async (req, res, next) => {
const schema = Joi.object({
rolename: Joi.string().trim().required(),
description: Joi.string().trim(),
});

try {
Expand Down
Loading