title: Pass parameters to Firebase cloud function
body: <p>I want to update the document fields using the parameters passed to cloud function. I am getting an error
  as
  5 NOT_FOUND: No document to update: projects/react-ycce/databases/(default)/documents/papers/etc </p>
  
  <p>values are passed in function, but I don't know how to put them in the query. Please help me.</p>
  
  <pre><code>exports.upload = functions.https.onCall((data, context) =&gt; {
  
      let dept = data.dept;
  
      let paperRef = db.collection("papers/"+data.dept);
      console.log(paperRef);
  
      return paperRef.update({
          name : data.doc_name,
          dept : data.dept,
          sem : data.sem,
          course_code : data.cc,
          type : data.resources,
          url: data.resourceLink,   
      })
      .then( () =&gt;{ return("Successfully Uploaded")}
      )
      .catch(error =&gt; {
          console.log(error.message);
          return("Error while uploading");   
      });
  
  });
  </code></pre>