Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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