origin/apps/server/src/hello/hello.router.ts

13 lines
402 B
TypeScript
Raw Normal View History

2024-07-11 11:00:51 +08:00
import { Injectable } from '@nestjs/common';
import { TrpcService } from '@server/trpc/trpc.service';
import { HelloService } from './hello.service';
@Injectable()
export class HelloRouter {
constructor(private readonly trpc: TrpcService, private readonly hello: HelloService) { }
router = this.trpc.router({
hello: this.trpc.procedure.query(() => this.hello.helloWorld()),
});
}