import { Airtable } from "https://deno.land/x/airtable/mod.ts";
type Airtable = {
apiKey: string;
};
type AirtableTable = {
baseId: string;
tableName: string;
};
export async function main(
atCon: Airtable,
atTable: AirtableTable,
newRecord: object,
) {
const airtable = new Airtable({ ...atCon, ...atTable });
const createOne = await airtable.create(newRecord);
return createOne;
}
Submitted by hugo697 465 days ago
import { Airtable } from "https://deno.land/x/airtable/mod.ts";
type Airtable = {
apiKey: string;
};
type AirtableTable = {
baseId: string;
tableName: string;
};
export async function main(
at_con: Airtable,
at_table: AirtableTable,
new_record: object,
) {
const airtable = new Airtable({ ...at_con, ...at_table });
const createOne = await airtable.create(new_record);
return createOne;
}
Submitted by hugo697 465 days ago