Revert "fix: all body parameter of API must be in lowercase"

This commit is contained in:
Amol
2024-01-25 18:59:55 +05:30
committed by GitHub
parent bfa0e0e144
commit 8686a35405
10 changed files with 241 additions and 306 deletions
@@ -8,8 +8,8 @@ export default async function updateDocument(request, response) {
tokenQuery.equalTo('token', reqToken);
const token = await tokenQuery.first({ useMasterKey: true });
if (token !== undefined) {
// Valid Token then proceed request
const allowedKeys = ['name', 'note', 'description'];
// Valid Token then proceed request
const allowedKeys = ['Name', 'Note', 'Description'];
const objectKeys = Object.keys(request.body);
const isValid = objectKeys.every(key => allowedKeys.includes(key)) && objectKeys.length > 0;
if (isValid) {