Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Countries API #2

Merged
merged 6 commits into from
Mar 12, 2021
Merged

Add Countries API #2

merged 6 commits into from
Mar 12, 2021

Conversation

AlexeyTeterin
Copy link
Collaborator

No description provided.

countryID: { type: String, required: true },
titleEN: { type: String, required: true, unique: true },
titleRU: { type: String, required: true, unique: true },
titleDE: { type: String, required: true },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

titleDE: { type: String, required: true }, тоже unique: true. Но, наверное, лучше id уникальным оставить. М б ситуация когда на разных языках слово пишется одинаково


export const countriesRouter: express.Router = express.Router()

countriesRouter.options(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cors проверки у нас на верхнем уровне подключены, теоретически действуют на все запросы. Попробуй убрать запрос options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

infoRU: string
infoDE: string
pictureURL: string
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не хватает пустой строки

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

currency: string
pictureURL: string
videoURL: string
sights: ISight[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sights: Array

currency: string
pictureURL: string
videoURL: string
sights: ISight[]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Запятых в конце строки отсыпь, пожалуйста )

infoEN: string
infoRU: string
infoDE: string
currency: string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Есть подозрение, что currency - это сложный тип с идентификатором валют и наименованиями на разных языках, может быть, символом. Предлагаю это обсудить

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предлагаю делать тут трехбуквенное обозначение - USD, RUB...


export const countriesRouter: express.Router = express.Router()

countriesRouter.options(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options точно надо вручную обрабатывать?

Copy link
Owner

@lbratkovskaya lbratkovskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Фикс запятых - в следующем ПР

@lbratkovskaya lbratkovskaya merged commit fb4352e into develop Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants