Skip to content

Instantly share code, notes, and snippets.

@tanveerprottoy
Last active May 3, 2022 12:00
Show Gist options
  • Save tanveerprottoy/6d154a4e1c034b719b5d83f1dfc1e09d to your computer and use it in GitHub Desktop.
Save tanveerprottoy/6d154a4e1c034b719b5d83f1dfc1e09d to your computer and use it in GitHub Desktop.
app.service.ts
import { Injectable } from '@nestjs/common';
import { AppRepository } from './app.repository';
import { CreateAppDto } from './create-app.dto';
@Injectable()
export class AppService {
constructor(
private readonly repository: AppRepository
) { }
async create(dto: CreateAppDto): Promise<any> {
return await this.repository.create(dto);
}
async findAll(): Promise<any> {
return await this.repository.findAll();
}
async findOne(id: string): Promise<any> {
return await this.repository.findOne(id);
}
async update(id: string): Promise<any> {
return await this.repository.update(id);
}
async delete(id: string): Promise<any> {
return await this.repository.delete(id);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment