Skip to content

Commit

Permalink
Add lambda to yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jotacemarin committed Sep 8, 2024
1 parent f5fa6d3 commit 195d568
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export { telegramCleanReplyMarkup } from "./src/functions/telegram_clean_reply_m
export { telegramMembersMute } from "./src/functions/telegram_members_mute";
export { telegramMembersUnmute } from "./src/functions/telegram_members_unmute";
export { telegramPublicWebhook } from "./src/functions/telegram_public_webhook";
export { telegramGetMessages } from "./src/functions/telegram_get_messages";
1 change: 1 addition & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ functions:
telegramMembersMute: ${file(./src/functions/telegram_members_mute/function.yml)}
telegramMembersUnmute: ${file(./src/functions/telegram_members_unmute/function.yml)}
telegramPublicWebhook: ${file(./src/functions/telegram_public_webhook/function.yml)}
telegramGetAllMessages: ${file(./src/functions/telegram_get_messages/function.yml)}
4 changes: 2 additions & 2 deletions src/functions/telegram_get_messages/function.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: ${self:custom.secrets.service.name}-${self:custom.secrets.provider.stage}-telegram-get-messages
handler: index.telegramGetAll
handler: index.telegramGetMessages
memorySize: 128
timeout: 30
reservedConcurrency: 5
events:
- http:
path: /${self:custom.secrets.service.name}-${self:custom.secrets.provider.stage}/telegram/get-messages
method: POST
method: GET
cors: true
authorizer: telegramAuthorizer
2 changes: 1 addition & 1 deletion src/functions/telegram_get_messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const execute = async (): Promise<any> => {
return { statusCode: OK, body: JSON.stringify(messages) };
};

export const telegramGetAll = async (
export const telegramGetMessages = async (
event: APIGatewayEvent,
context: Context,
callback: Callback
Expand Down

0 comments on commit 195d568

Please sign in to comment.