Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit 0efd2d8

Browse files
committed
fix: add public userDTO to prevent confusion
1 parent 4329952 commit 0efd2d8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

backend/src/share/dto/share.dto.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Expose, plainToClass, Type } from "class-transformer";
2-
import { AuthSignInDTO } from "src/auth/dto/authSignIn.dto";
32
import { FileDTO } from "src/file/dto/file.dto";
3+
import { PublicUserDTO } from "src/user/dto/publicUser.dto";
44

55
export class ShareDTO {
66
@Expose()
@@ -14,8 +14,8 @@ export class ShareDTO {
1414
files: FileDTO[];
1515

1616
@Expose()
17-
@Type(() => AuthSignInDTO)
18-
creator: AuthSignInDTO;
17+
@Type(() => PublicUserDTO)
18+
creator: PublicUserDTO;
1919

2020
from(partial: Partial<ShareDTO>) {
2121
return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true });
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { PickType } from "@nestjs/swagger";
2+
import { UserDTO } from "./user.dto";
3+
4+
export class PublicUserDTO extends PickType(UserDTO, ["email"] as const) {}

0 commit comments

Comments
 (0)