Skip to content

Fix #152 salvar preferencias#2

Merged
CalebeRios merged 19 commits intodevfrom
#152_salvar_preferencias
May 9, 2019
Merged

Fix #152 salvar preferencias#2
CalebeRios merged 19 commits intodevfrom
#152_salvar_preferencias

Conversation

@LhTaira
Copy link
Contributor

@LhTaira LhTaira commented May 7, 2019

Nesse pull request foi feito:

História #14
Issue #152
Armazenamento de dados de usuarios

micaellagouveia and others added 14 commits May 1, 2019 12:03
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: Eduardo Lima <eduardolima.df@gmail.com>
Co-authored-by: MIcaella Gouveia <micaella2212@gmail.com>
Co-authored-by: Micaella Gouveia <micaella2212@gmail.com>
Co-authored-by: Micaella Gouveia <micaellagouveia2212@gmail.com>
Copy link
Contributor

@CalebeRios CalebeRios left a comment

Choose a reason for hiding this comment

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

Tem comentários para alteração. E faltou adicionarem a rota no README. Façam as alterações por favor

local: '',
notificationDays: '',
notificationTime: '',

Copy link
Contributor

Choose a reason for hiding this comment

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

Linha desnecessária

local: '',
notificationDays: '',
notificationTime: '',

Copy link
Contributor

Choose a reason for hiding this comment

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

Linha desnecessária

src/index.js Outdated

mongooseConnection.connect();

app.get('/', (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Pode ir para routes

Copy link
Contributor

Choose a reason for hiding this comment

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

Aproveitem e já alterem essa rota para apresentar as endpoints

user.findMe().then(() => {
res.send(user);
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Falta uma quebra de linha aqui

poolSize: 10,
bufferMaxEntries: 0,
useNewUrlParser: true,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Falta uma quebra de linha aqui

notificationDays: String,
notificationTime: String,
local: String,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Falta quebra de linha aqui

const UserSchema = new mongoose.Schema({
telegramId: String,
sport: String,
notificationDays: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

Porque isso é do tipo string? Ele deve ser um Array de Strings, pois eu posso salvar assim: quarta, quinta, sexta.

Copy link
Member

Choose a reason for hiding this comment

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

Tomamos a liberdade de alterar sport, time e local para Array também. Sendo possível agora salvar vários horários, esportes e locais.

@@ -0,0 +1,18 @@
module.exports = {

Copy link
Contributor

Choose a reason for hiding this comment

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

linha desnecessária

endpoint: '/userRegister',
parameters: [
{
type: 'JSON',
Copy link
Contributor

Choose a reason for hiding this comment

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

Isso não é nenhum tipo. O que tem dentro desse JSON? Precisa especificar.

Copy link
Contributor

Choose a reason for hiding this comment

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

Altere no readme tbm

Co-authored-by: Ed-vL <eduardolima.df@gmail.com>
Copy link
Contributor

@AmandaMuniz AmandaMuniz left a comment

Choose a reason for hiding this comment

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

Esse pr atende todos os critérios de aceitação. A mudança na classe foi aceita e o restante da arquitetura está sendo seguido


module.exports = class User {
constructor(telegramId) {
this.user = new UserModel({
Copy link
Contributor

Choose a reason for hiding this comment

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

Essa mudança será aceita e o diagrama de classe será refatorado

return this.user.local[index];
}

saveUser() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Cumpre critério de aceitação de salvar user

notificationDays: [],
notificationTime: [],
local: [],
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Cumpre critério de aceitação de salvar preferências de notificação.

@Ed-vL Ed-vL requested a review from CalebeRios May 8, 2019 03:26
LhTaira and others added 2 commits May 8, 2019 09:06
@CalebeRios CalebeRios merged commit e39379f into dev May 9, 2019
@Ed-vL Ed-vL deleted the #152_salvar_preferencias branch May 16, 2019 21:40
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.

6 participants