@lxdhub/api
Version:
Display, search and copy LXD-images using a web interface.
30 lines (26 loc) • 667 B
text/typescript
import { Controller, Get } from '@nestjs/common';
import { ApiResponse } from '@nestjs/swagger';
import { RemoteService } from './remote.service';
import { ResponseDto } from '../common';
import { RemoteDto } from './dtos';
/**
* The Remote-Controller, which is the API
* interface for Remote-Operations.
*/
('/api/v1/remote')
export class RemoteController {
constructor(
private readonly remoteService: RemoteService
) { }
/**
* Returns all remotes
*/
('/')
({
type: ResponseDto,
status: 200
})
async findAll(): Promise<ResponseDto<RemoteDto[]>> {
return await this.remoteService.findAll();
}
}