Skip to content

#160193526 Fix create article response#35

Open
Lumexralph wants to merge 10 commits intodevelopfrom
bg_fix_create_article_response
Open

#160193526 Fix create article response#35
Lumexralph wants to merge 10 commits intodevelopfrom
bg_fix_create_article_response

Conversation

@Lumexralph
Copy link

What does this PR do?

  • Fixes article API controllers response

Description of Task to be completed?

ISSUE
When a user creates article it should return the number of likes on the article and not return favourites or favourites counts

FIX
Remove favourites and favourites count from the article model add association of likes and article model to get number of likes added to the create article response

How should this be manually tested?

In ComandLine:

  • git clone https://github.com/andela/fargo-ah-client.git Authors-Haven-Client
  • npm install
  • npm run test

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

https://www.pivotaltracker.com/story/show/160193526

@klevamane klevamane temporarily deployed to fargo-ah-staging-pr-35 September 4, 2018 16:16 Inactive
expect(createdArticle.User).to.be.an('object').to.have.property('username').to.equal(validUser.user.username);
expect(createdArticle.User).to.have.property('bio');
expect(createdArticle.User).to.have.property('image');
// expect(createdArticle.author).to.be.an('object').to.have.property('username').to.equal(validUser.user.username);

Choose a reason for hiding this comment

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

Line 84 exceeds the maximum line length of 100 max-len

},
returning: true,
plain: true
})

Choose a reason for hiding this comment

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

Expected indentation of 4 spaces but found 6 indent

slug,
},
returning: true,
plain: true

Choose a reason for hiding this comment

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

Expected indentation of 6 spaces but found 8 indent

where: {
slug,
},
returning: true,

Choose a reason for hiding this comment

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

Expected indentation of 6 spaces but found 8 indent

})
where: {
slug,
},

Choose a reason for hiding this comment

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

Expected indentation of 6 spaces but found 8 indent

plain: true
})
where: {
slug,

Choose a reason for hiding this comment

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

Expected indentation of 8 spaces but found 10 indent

returning: true,
plain: true
})
where: {

Choose a reason for hiding this comment

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

Expected indentation of 6 spaces but found 8 indent

@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 6e0fe8d to 3d1458b Compare September 4, 2018 16:19
@klevamane klevamane temporarily deployed to fargo-ah-staging-pr-35 September 4, 2018 16:19 Inactive
@coveralls
Copy link

coveralls commented Sep 4, 2018

Pull Request Test Coverage Report for Build 696

  • 4 of 4 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 91.545%

Totals Coverage Status
Change from base Build 690: -0.05%
Covered Lines: 613
Relevant Lines: 654

💛 - Coveralls

@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 3d1458b to 0f6b558 Compare September 4, 2018 16:23
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 0f6b558 to 23271bd Compare September 12, 2018 13:16
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 14:20 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 23271bd to 184c467 Compare September 12, 2018 15:05
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:08 Inactive
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:09 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 184c467 to ec1543b Compare September 12, 2018 15:15
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:16 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from ec1543b to 5a0118c Compare September 12, 2018 15:21
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:21 Inactive
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:30 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 5a0118c to c9ff59a Compare September 12, 2018 15:48
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 15:51 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from c9ff59a to 2b6da23 Compare September 12, 2018 16:26
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 16:27 Inactive
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 16:31 Inactive
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 16:34 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 2b6da23 to 21bbf51 Compare September 12, 2018 16:42
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 16:44 Inactive
@Lumexralph Lumexralph force-pushed the bg_fix_create_article_response branch from 21bbf51 to 6917179 Compare September 12, 2018 17:15
@Lumexralph Lumexralph temporarily deployed to fargo-ah-staging September 12, 2018 17:15 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from e61c1a0 to 60cf570 Compare September 27, 2018 01:00
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 01:00 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from 60cf570 to e30594a Compare September 27, 2018 09:33
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 09:33 Inactive
	- include Like model in article response
	- fix get all article and get an article response

[Fixes #160193526]
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from e30594a to a6a7ea1 Compare September 27, 2018 15:19
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 15:20 Inactive
@veeqtor veeqtor temporarily deployed to fargo-ah-staging September 27, 2018 15:32 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from 0275315 to 4db2cdd Compare September 27, 2018 16:06
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 16:07 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from 4db2cdd to d97b14b Compare September 27, 2018 17:04
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:05 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from d97b14b to 4044200 Compare September 27, 2018 17:08
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:09 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from 4044200 to e7a2d82 Compare September 27, 2018 17:23
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:29 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from e7a2d82 to 71a9490 Compare September 27, 2018 17:41
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:42 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch from 71a9490 to 089b9a9 Compare September 27, 2018 17:48
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:48 Inactive
@ascii-dev ascii-dev force-pushed the bg_fix_create_article_response branch 2 times, most recently from 91e38fb to dcf69de Compare September 27, 2018 17:57
@ascii-dev ascii-dev temporarily deployed to fargo-ah-staging September 27, 2018 17:57 Inactive
	- include Like model in article response
	- fix get all article and get an article response

[Fixes #160193526]
router.post('/users', validateSignup, UsersController.registerUser);
router.post('/users/password/reset', inputValidator.validateEmail, utils.checkEmail, utils.sendEmail);

// router.post('/users/password/reset', inputValidator.validateEmail, utils.checkEmail, utils.sendEmail);

Choose a reason for hiding this comment

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

Line 46 exceeds the maximum line length of 100 max-len

@veeqtor veeqtor removed their request for review December 17, 2018 12:39
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.

8 participants