Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit bd5af0a

Browse files
committed
updated Backend
1 parent 1e7fb0b commit bd5af0a

5 files changed

Lines changed: 5 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
**/.serverless
77
**/.vscode
88
**/*.http
9+
**/*.tests.*

backend/functions/auth/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const cognitoClient = new CognitoIdentityProviderClient({})
1313

1414
export const handler = async (event: APIGatewayProxyEventV2): Promise<APIGatewayProxyResultV2> => {
1515
try {
16-
const { username, password } = event.queryStringParameters ?? {}
16+
const { username, password } = JSON.parse(event.body ?? '{}')
1717
if (!username || !password) return error(badRequest(required('username', 'password')), 'ERR_LOGIN_BAD_REQUEST')
1818

1919
const command = new InitiateAuthCommand({

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"license": "ISC",
1414
"author": "",
15-
"type": "module",
15+
"type": "commonjs",
1616
"main": "index.js",
1717
"scripts": {
1818
"build": "tsc",

backend/serverless.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ custom:
150150
concurrency: 10
151151
treeShaking: true
152152
packager: npm
153+
format: 'cjs'
153154
prune:
154155
automatic: true
155156
number: 3

backend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"esModuleInterop": true,
88
"skipLibCheck": true
99
},
10-
"include": ["functions/**/*.ts", "utils/**/*.ts"],
10+
"include": ["functions/**/*.ts", "utils/**/*.ts", "**/*.ts"],
1111
"exclude": ["node_modules"]
1212
}

0 commit comments

Comments
 (0)