Create modules,providers, services for bd

This commit is contained in:
Errormacr
2023-11-17 21:32:11 +03:00
parent 795cd6468a
commit 256fa08fc4
26 changed files with 653 additions and 77 deletions

View File

@@ -0,0 +1,15 @@
import { Injectable, Inject } from '@nestjs/common';
import { Repository } from 'typeorm';
import { Post } from '../db.entity';
import { postRep } from '../constants';
@Injectable()
export class PostService {
constructor(
@Inject(postRep)
private photoRepository: Repository<Post>,
) {}
async findAll(): Promise<Post[]> {
return this.photoRepository.find();
}
}