Created
January 21, 2022 08:56
-
-
Save job25721/0336587f1e0cfbbe49f1784ceb065096 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 axios from 'axios'; | |
import { User } from 'src/user/user.schema'; | |
@Injectable() | |
export class JsonPlaceholderService { | |
private serviceUrl = 'https://jsonplaceholder.typicode.com'; | |
getUsers() { | |
return axios.get<User[]>(`${this.serviceUrl}/users`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment