Improve parkio, add domainrproxy
This commit is contained in:
20
src/domainrproxy/domainrproxy.controller.ts
Normal file
20
src/domainrproxy/domainrproxy.controller.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Body, Controller, Get, Param, Post, UseGuards } from '@nestjs/common';
|
||||
import { DomainrproxyService } from './domainrproxy.service';
|
||||
import { AuthGuard } from 'src/auth/auth.guard';
|
||||
|
||||
@Controller('domainrproxy')
|
||||
export class DomainrproxyController {
|
||||
constructor(private readonly proxyService: DomainrproxyService) {}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@Get(':domain')
|
||||
queryDomain(@Param('domain') domain: string) {
|
||||
return this.proxyService.queryForDomain(domain);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@Post('search')
|
||||
search(@Body() body: { query: string }) {
|
||||
return this.proxyService.search(body.query);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user