mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 20:49:42 +03:00
16 lines
403 B
TypeScript
16 lines
403 B
TypeScript
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();
|
|
}
|
|
}
|