Skip to content

Commit 28c12bc

Browse files
Merge pull request #26 from matheuspiment/development
Small fixes
2 parents 474a113 + ac10c41 commit 28c12bc

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.huskyrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"hooks": {
3-
"pre-commit": "test && lint-staged"
3+
"pre-commit": "yarn lint-staged"
44
}
5-
},
5+
}

__tests__/helpers/MongooseConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import '../../src/bootstrap'
33
import mongoose from 'mongoose'
44

55
class MongooseConnection {
6-
async connect (testSuitName: string): Promise<void> {
7-
mongoose.connect(`${process.env.MONGO_URI}-${testSuitName}`, {
6+
async connect (testSuiteName: string): Promise<void> {
7+
mongoose.connect(`${process.env.MONGO_URI}-${testSuiteName}`, {
88
useNewUrlParser: true,
99
useUnifiedTopology: true,
1010
useCreateIndex: true

src/controllers/CityController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Yup from 'yup'
33
import axios from 'axios'
44
import map from 'lodash/map'
55

6-
import { GoogleMapPrediction } from '../types'
6+
import { GoogleMapsPrediction } from '../types'
77
import googleMapsConfig from '../config/googleMaps'
88

99
class CityController {
@@ -19,7 +19,7 @@ class CityController {
1919
params: {
2020
input: req.query.search,
2121
types: '(cities)',
22-
language: 'es_US',
22+
language: 'en_US',
2323
key: process.env.GOOGLE_MAPS_API_KEY
2424
}
2525
})
@@ -30,7 +30,7 @@ class CityController {
3030

3131
const normalizedCities = map(
3232
response.data.predictions,
33-
(prediction: GoogleMapPrediction) => prediction.description
33+
(prediction: GoogleMapsPrediction) => prediction.description
3434
)
3535

3636
return res.status(200).json({ cities: normalizedCities })

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export interface AuthRequest extends Request {
66
userId: string
77
}
88

9-
export interface GoogleMapPrediction {
9+
export interface GoogleMapsPrediction {
1010
description: string
1111
}

0 commit comments

Comments
 (0)