feat(web): show partners assets on the main timeline (#4933)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { AuthUserDto, PartnerDirection, PartnerService, UserResponseDto } from '@app/domain';
|
||||
import { Controller, Delete, Get, Param, Post, Query } from '@nestjs/common';
|
||||
import { AuthUserDto, PartnerDirection, PartnerService } from '@app/domain';
|
||||
import { PartnerResponseDto, UpdatePartnerDto } from '@app/domain/partner/partner.dto';
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
|
||||
import { ApiQuery, ApiTags } from '@nestjs/swagger';
|
||||
import { AuthUser, Authenticated } from '../app.guard';
|
||||
import { UseValidation } from '../app.utils';
|
||||
@@ -17,15 +18,24 @@ export class PartnerController {
|
||||
getPartners(
|
||||
@AuthUser() authUser: AuthUserDto,
|
||||
@Query('direction') direction: PartnerDirection,
|
||||
): Promise<UserResponseDto[]> {
|
||||
): Promise<PartnerResponseDto[]> {
|
||||
return this.service.getAll(authUser, direction);
|
||||
}
|
||||
|
||||
@Post(':id')
|
||||
createPartner(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<UserResponseDto> {
|
||||
createPartner(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<PartnerResponseDto> {
|
||||
return this.service.create(authUser, id);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
updatePartner(
|
||||
@AuthUser() authUser: AuthUserDto,
|
||||
@Param() { id }: UUIDParamDto,
|
||||
@Body() dto: UpdatePartnerDto,
|
||||
): Promise<PartnerResponseDto> {
|
||||
return this.service.update(authUser, id, dto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
removePartner(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<void> {
|
||||
return this.service.remove(authUser, id);
|
||||
|
||||
Reference in New Issue
Block a user