This commit is contained in:
pincman 2024-05-09 16:26:37 +08:00
parent 2704a9ee9e
commit 8cfbfa85cb
2 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,5 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
parserOptions: {

View File

@ -1,4 +1,3 @@
import { CreateRequestContext } from '@mikro-orm/core';
import { Injectable } from '@nestjs/common';
import { PostRepository } from '../repositories/post.repository';
@ -7,11 +6,8 @@ import { PostRepository } from '../repositories/post.repository';
export class PostService {
constructor(protected postRepo: PostRepository) {}
@CreateRequestContext<PostService>((t) => t.postRepo)
async item() {
console.log('test');
// @CreateRequestContext<PostService>((t) => t.postRepo)
async list() {
return this.postRepo.findAll();
}
@CreateRequestContext<PostService>((t) => t.postRepo)
async list() {}
}