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

Callback function does not accept promises #99

Open
ahelord opened this issue Jan 3, 2018 · 0 comments
Open

Callback function does not accept promises #99

ahelord opened this issue Jan 3, 2018 · 0 comments

Comments

@ahelord
Copy link

ahelord commented Jan 3, 2018

I am trying to pass the parameter of the route to a promise to return the names of the clients but I do not succeed I have tried this

 async getNameForUser(id: string):string{
   const message = await this.getAsyncName("1");
   return message



  }

  public async getAsyncName(id: string): Promise<string> {

    const response = await this.userService.getUserByIdUser(+id)
    return response.first_name
  }
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

No branches or pull requests

1 participant