Skip to content

Commit 3efde0e

Browse files
committed
added ttl and status codes
1 parent 4bd99e8 commit 3efde0e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

config/custom-environment-variables.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports = {
6868

6969
rdsServerlessBot: {
7070
rdsServerLessPrivateKey: "RDS_SERVERLESS_PRIVATE_KEY",
71+
ttl: "RDS_SERVERLESS",
7172
},
7273

7374
cloudinary: {

config/default.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ module.exports = {
7878
CLOUDFLARE_X_AUTH_EMAIL: "Cloudflare_User_Email",
7979
},
8080

81+
rdsServerlessBot: {
82+
rdsServerLessPrivateKey: "RDS_SERVERLESS_PRIVATE_KEY",
83+
ttl: "RDS_SERVERLESS",
84+
},
85+
8186
integrations: {
8287
newrelic: {
8388
appName: "RDS_API_production",

config/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,6 @@ module.exports = {
145145
"PZLea6NmAwZZE+dNU/EC9wVhexzqVU14J5gccBKilP9+a22QN1ES4MaOkTKlgffM\n" +
146146
"aYGCT7Q+yV3Yju9dZ3hAyVZxdGQSL0Q1sVr/kleaUacw1ztKBeHCgQ==\n" +
147147
"-----END RSA PRIVATE KEY-----",
148+
ttl: 60,
148149
},
149150
};

controllers/discordactions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ const createGroupRole = async (req, res) => {
4646

4747
groupRoleData.roleid = responseForCreatedRole.id;
4848

49-
await discordRolesModel.createNewRole(groupRoleData);
50-
return res.json({
49+
const { id } = await discordRolesModel.createNewRole(groupRoleData);
50+
return res.status(201).json({
5151
message: "Role created successfully!",
52+
id,
5253
});
5354
} catch (err) {
5455
logger.error(`Error while creating new Role: ${err}`);
@@ -112,7 +113,7 @@ const addGroupRoleToMember = async (req, res) => {
112113
headers: { "Content-Type": "application/json", Authorization: `Bearer ${authToken}` },
113114
}).then((response) => response.json());
114115

115-
return res.json({
116+
return res.status(201).json({
116117
message: "Role added successfully!",
117118
});
118119
} catch (err) {

0 commit comments

Comments
 (0)