Guest User

Untitled

a guest
Jan 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import { UserService } from "./UserService";
  2.  
  3. export class MessageService {
  4.  
  5. constructor(private readonly userService: UserService){}
  6.  
  7. async prepareMessage(text: string, userId: string) {
  8. const user = await this.userService.getUser(userId);
  9. return {
  10. to: user.email,
  11. title: `Hello ${user.name}`,
  12. body: text
  13. }
  14.  
  15. }
  16. }
Add Comment
Please, Sign In to add comment