mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-10-01 14:04:59 +02:00
Revert "fix: all body parameter of API must be in lowercase"
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user