Commit 2731a9ed authored by JunHyung An's avatar JunHyung An
Browse files

Send secret `key` to backend

parent 6591a5d7
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -36,8 +36,10 @@ export default {

  methods: {
    postData() {
      axios.post(`${API_URL}/${RANDOM_TOKEN}`,
      {
      axios.post(`${API_URL}/${RANDOM_TOKEN}`, {
          key1: this.message,
          key2: this.message2,
        },
        responseType: 'json',
        headers: {
								'Content-Type': 'application/json',
@@ -49,10 +51,8 @@ export default {
          }
      )
        .then(response => {
          let lat = response.data.latitude ? parseFloat(response.data.latitude) : 37.579617;
          let lng = response.data.longitude ? parseFloat(response.data.longitude) : 126.977041;
          console.log(lat)
          console.log(lng)
          let result = response.data
          console.log(result);

          // Do something with the response data
          // window.location.href = `#/result?lat=${lat}&lng=${lng}`;