Skip to content

Commit

Permalink
refactor(lambda): 🎨 Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
viniieng committed Apr 4, 2024
1 parent 91389d2 commit c3a1804
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/lambda/lambdaGetParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import { APIGatewayEvent } from 'aws-lambda'
import { error } from '../error/index'
import { Docfy, DocfySettings } from '.'

interface Params {
[key: string]: string | number | boolean
}

interface Errs {

[key: string]: string
}

export const lambdaGetParameters = (event: object, eventParams: object): { [key: string]: any } => {
const fedParams = {}

Expand Down Expand Up @@ -81,14 +90,6 @@ export const lambdaSettingsGetParameters = <T>(docfy: Docfy, evt: APIGatewayEven
Object.assign(parameters, requestContext.params)
Object.assign(errs, requestContext.errs)

interface Params {
[key: string]: string | number | boolean
}

interface Errs {

[key: string]: string
}
if (docfy.body) {
try {
const evtobj = {
Expand Down

0 comments on commit c3a1804

Please sign in to comment.