Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: delete useless file
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Sep 12, 2021
1 parent e691fbf commit c670cee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 7 additions & 10 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,18 @@ export class AuthService {

public async login(loginInput: LoginInput) {
const { email, password, token } = loginInput
// const { success, 'error-codes': errorCodes } = await this.verifyGoogleRecaptchaToken(token)
const { success, 'error-codes': errorCodes } = await this.verifyGoogleRecaptchaToken(token)

// if (success) {
// const res = await this.validateUser(email, password)
// return this.generateJWT(email, res)
// }

const res = await this.validateUser(email, password)
return this.generateJWT(email, res)
if (success) {
const res = await this.validateUser(email, password)
return this.generateJWT(email, res)
}

/* throw new AuthenticationError(
throw new AuthenticationError(
errorCodes
? errorCodes.toString()
: 'Google Recaptcha verification failed. Please try again!',
) */
)
}

public async register(registerInput: RegisterInput) {
Expand Down
2 changes: 0 additions & 2 deletions src/shared/middlewares/middleware.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import bodyParser from 'body-parser'
import morgan from 'morgan'
import helmet from 'helmet'
import rateLimit from 'express-rate-limit'
import { graphqlUploadExpress } from 'graphql-upload'
import { CORS_ORIGINS } from '../constants'

export const configMiddlewares = (app: INestApplication) => {
Expand Down Expand Up @@ -35,5 +34,4 @@ export const configMiddlewares = (app: INestApplication) => {
max: 100,
}),
)
// app.use(graphqlUploadExpress({ maxFileSize: 10000000, maxFiles: 10 }))
}

0 comments on commit c670cee

Please sign in to comment.