21 lines
697 B
TypeScript
21 lines
697 B
TypeScript
import { Controller, Get, Param, Query, UseGuards } from '@nestjs/common';
|
|
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
|
import { AdminStoreLogsService } from './admin-store-logs.service';
|
|
import { AdminStoreLogsQueryDto } from './dto/admin-query.dto';
|
|
|
|
@Controller('admin/logs/stores')
|
|
@UseGuards(HqAuthGuard)
|
|
export class AdminStoreLogsController {
|
|
constructor(private readonly service: AdminStoreLogsService) {}
|
|
|
|
@Get()
|
|
list(@Query() query: AdminStoreLogsQueryDto) {
|
|
return this.service.list(query);
|
|
}
|
|
|
|
@Get(':source/:rawId')
|
|
detail(@Param('source') source: string, @Param('rawId') rawId: string) {
|
|
return this.service.detail(`${source}:${rawId}`);
|
|
}
|
|
}
|