text: import handler from "../libs/handler-lib";
  import dynamoDb from "../libs/dynamodb-lib";
  
  export const main = handler(async (event, context) => {
    console.log("event:", event);
    const params = {
      TableName: process.env.tableName,
      // 'Key' defines the partition key and sort key of the item to be retrieved
      Key: {
        userId: "123", // The id of the author
        noteId: event.pathParameters.id, // The id of the note from the path
        //get from param instead of body
      },
    };
  
    const result = await dynamoDb.get(params);
    if (!result.Item) {
      throw new Error("Item not found.");
    }
  
    // Return the retrieved item
    return result.Item;
  });
  