Created
January 21, 2022 08:53
-
-
Save job25721/930019a3d399621acd179d4e817749e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@nestjs/common'; | |
import { JsonPlaceholderService } from 'src/services/jsonPlacehodlerService'; | |
import { User } from './user.schema'; | |
@Injectable() | |
export class UserSerivce { | |
constructor( | |
private readonly jsonPlaceholderService: JsonPlaceholderService, | |
) {} | |
helloWorld(): string { | |
return 'hello world'; | |
} | |
async getUsers(): Promise<User[]> { | |
const response = await this.jsonPlaceholderService.getUsers(); | |
return response.data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment