Skip to content

Commit

Permalink
fix: reverting test twelvelabs call
Browse files Browse the repository at this point in the history
  • Loading branch information
ca513zn committed Sep 4, 2024
1 parent 8b71380 commit a38ddee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions amplify/functions/api-function/handler.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import type { APIGatewayProxyHandler } from "aws-lambda";
import { TwelveLabs } from "twelvelabs-js";

export const handler: APIGatewayProxyHandler = async (event) => {
console.log("event", event);
const client = new TwelveLabs({ apiKey: "<YOUR_API_KEY>" });
return {
statusCode: 200,
// Modify the CORS settings below to match your specific requirements
headers: {
"Access-Control-Allow-Origin": "*", // Restrict this to domains you trust
"Access-Control-Allow-Headers": "*", // Specify only the headers you need to allow
},
body: JSON.stringify(client),
body: JSON.stringify("Hello from myFunction!"),
};
};

0 comments on commit a38ddee

Please sign in to comment.