-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
3241832
to
524bbc7
Compare
src/models/sights.ts
Outdated
countryID: { type: String, required: true }, | ||
titleEN: { type: String, required: true, unique: true }, | ||
titleRU: { type: String, required: true, unique: true }, | ||
titleDE: { type: String, required: true }, |
There was a problem hiding this comment.
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 уникальным оставить. М б ситуация когда на разных языках слово пишется одинаково
src/routes/countries.ts
Outdated
|
||
export const countriesRouter: express.Router = express.Router() | ||
|
||
countriesRouter.options( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cors проверки у нас на верхнем уровне подключены, теоретически действуют на все запросы. Попробуй убрать запрос options.
There was a problem hiding this comment.
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не хватает пустой строки
There was a problem hiding this comment.
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[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sights: Array
0195dc4
to
2ad1e04
Compare
currency: string | ||
pictureURL: string | ||
videoURL: string | ||
sights: ISight[] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Есть подозрение, что currency - это сложный тип с идентификатором валют и наименованиями на разных языках, может быть, символом. Предлагаю это обсудить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю делать тут трехбуквенное обозначение - USD, RUB...
src/routes/countries.ts
Outdated
|
||
export const countriesRouter: express.Router = express.Router() | ||
|
||
countriesRouter.options( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options точно надо вручную обрабатывать?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Фикс запятых - в следующем ПР
No description provided.