Update index.js

Use any object in the request as the input to the database call