Skip to content

Commit

Permalink
fix: sns message to return response
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaz committed Feb 13, 2021
1 parent f92e7a7 commit 78f8aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sls-aws/src/sns/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EnvironmentConfig, Handler, SlsEnvironment, environment } from '@cabiri-io/sls-env'
import type { Context, SNSEvent } from 'aws-lambda'
import { response, responseOrError } from '../reponse/response-or-error'
import { response } from '../reponse/response-or-error'
import { jsonSNSMessage } from './json-sns-message'
import { jsonSNSMessages } from './json-sns-messages'

Expand All @@ -9,7 +9,7 @@ type SNSHandler = Handler<SNSEvent, Context, Promise<void>>
export const snsMessage = <D, P, C = never>(
config?: EnvironmentConfig<SNSHandler>
): SlsEnvironment<SNSHandler, C, D, P> =>
environment<SNSHandler, C, D, P>(config).payload(jsonSNSMessage).successHandler(responseOrError)
environment<SNSHandler, C, D, P>(config).payload(jsonSNSMessage).successHandler(response)

export const snsMessages = <D, P, C = never>(
config?: EnvironmentConfig<SNSHandler>
Expand Down

0 comments on commit 78f8aa1

Please sign in to comment.