Skip to content

Commit

Permalink
create function to send response back to client in getData file
Browse files Browse the repository at this point in the history
Relates #162
  • Loading branch information
mkatenolan committed Oct 14, 2019
1 parent 776b856 commit eabcd66
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/functions/getData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const axios = require('axios');

exports.handler = function(event, context, callback) => {

const API_URL = "https://api.airtable.com/v0/appaxMuUrlv5A04Y6/Table%201?";
const API_KEY ="keypHN8V7C2eXXyTU";

const API_QUERY_URL =`${API_URL}api_key=${API_KEY}`;

// send response back to client

const send = body => {
callback(null, {
statusCode: 200,
body: JSON.stringify(body)
});
}
}

// API call to Airtable

0 comments on commit eabcd66

Please sign in to comment.