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

Issue #SB-941 feat: user services dependency #115

Merged
merged 7 commits into from
Nov 30, 2017
Merged

Issue #SB-941 feat: user services dependency #115

merged 7 commits into from
Nov 30, 2017

Conversation

loganathan1989
Copy link
Contributor

No description provided.

Copy link
Contributor

@gsbajaj72 gsbajaj72 left a comment

Choose a reason for hiding this comment

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

Use user object. do not return data directly.

/**
* Class provides user object for user related services */

class UserPayload {
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be a user object. It is not a payload to anything. Please rename class and file accordingly.


class UserPayload {
constructor({
userId,
Copy link
Contributor

Choose a reason for hiding this comment

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

keep it as 'id'

class UserPayload {
constructor({
userId,
userName,
Copy link
Contributor

Choose a reason for hiding this comment

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

keep it as 'name'

let user = new UserPayload(res.result.response)
resolve(user)
}).catch((error) => {
console.log(error)
Copy link
Contributor

Choose a reason for hiding this comment

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

No console log please.

}).catch((error) => {
console.log(error)
if (_.get(error, 'body.params.err') === 'USER_NOT_FOUND') {
reject('USER_NOT_FOUND')
Copy link
Contributor

Choose a reason for hiding this comment

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

We should return an instance of error class

@gsbajaj72 gsbajaj72 merged commit e609b66 into Sunbird-Ed:release-1.3 Nov 30, 2017
rajeevsathish pushed a commit that referenced this pull request Aug 20, 2021
Issue #SB:26013 : pill click event issue fixed
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.

2 participants