chore: initial commit fix linting issues (#2169)

* chore: lint fixes
This commit is contained in:
Carlos R. L. Rodrigues
2022-09-21 12:19:03 -03:00
committed by GitHub
parent c661cc789b
commit eb8034502b
122 changed files with 543 additions and 439 deletions
@@ -1,7 +1,7 @@
import { IsEmail, IsNotEmpty, IsString } from "class-validator"
import AuthService from "../../../../services/auth"
import { EntityManager } from "typeorm";
import { EntityManager } from "typeorm"
import { MedusaError } from "medusa-core-utils"
import _ from "lodash"
import jwt from "jsonwebtoken"
@@ -78,7 +78,9 @@ import { validator } from "../../../../utils/validator"
* $ref: "#/components/responses/500_error"
*/
export default async (req, res) => {
const { projectConfig: { jwt_secret } } = req.scope.resolve('configModule')
const {
projectConfig: { jwt_secret },
} = req.scope.resolve("configModule")
if (!jwt_secret) {
throw new MedusaError(
MedusaError.Types.NOT_FOUND,
@@ -90,10 +92,9 @@ export default async (req, res) => {
const authService: AuthService = req.scope.resolve("authService")
const manager: EntityManager = req.scope.resolve("manager")
const result = await manager.transaction(async (transactionManager) => {
return await authService.withTransaction(transactionManager).authenticate(
validated.email,
validated.password
)
return await authService
.withTransaction(transactionManager)
.authenticate(validated.email, validated.password)
})
if (result.success && result.user) {