Skip to content

Commit a21e863

Browse files
committed
refactor(association-manager): minor change of name
1 parent c4deeb3 commit a21e863

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

functions/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,18 @@ async function addOrUpdateRoleInAssociation(role, associationDocRef, isNewRole)
235235
}
236236

237237
// Updated Cloud Function
238-
exports.addRole = onRequest(async (req, res) => {
238+
exports.saveRole = onRequest(async (req, res) => {
239239
try {
240240
const tokenId = req.body.data?.tokenId; // Token ID given by the user
241241
const role = req.body.data?.role; // Role to add or update
242242
const isNewRole = req.body.data?.isNewRole; // Boolean indicating whether it's a new role
243243
const associationUid = req.body.data?.associationUid; // Association UID from the client
244244

245245
if (!tokenId || !role || !associationUid || typeof isNewRole !== "boolean") {
246+
console.log("is isNewRole a Boolean :", (typeof isNewRole));
247+
console.log("tokenId : ", tokenId)
248+
console.log("role : ", role)
249+
console.log("associationUid : ", associationUid)
246250
return res.status(400).json({ message: "Missing or invalid required parameters" });
247251
}
248252

0 commit comments

Comments
 (0)