Last active
May 3, 2022 12:00
-
-
Save tanveerprottoy/6d154a4e1c034b719b5d83f1dfc1e09d to your computer and use it in GitHub Desktop.
app.service.ts
This file contains hidden or 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 { 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