diff --git a/backend/src/share/dto/share.dto.ts b/backend/src/share/dto/share.dto.ts index 8eb266b..7f3571a 100644 --- a/backend/src/share/dto/share.dto.ts +++ b/backend/src/share/dto/share.dto.ts @@ -1,6 +1,6 @@ import { Expose, plainToClass, Type } from "class-transformer"; -import { AuthSignInDTO } from "src/auth/dto/authSignIn.dto"; import { FileDTO } from "src/file/dto/file.dto"; +import { PublicUserDTO } from "src/user/dto/publicUser.dto"; export class ShareDTO { @Expose() @@ -14,8 +14,8 @@ export class ShareDTO { files: FileDTO[]; @Expose() - @Type(() => AuthSignInDTO) - creator: AuthSignInDTO; + @Type(() => PublicUserDTO) + creator: PublicUserDTO; from(partial: Partial) { return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true }); diff --git a/backend/src/user/dto/publicUser.dto.ts b/backend/src/user/dto/publicUser.dto.ts new file mode 100644 index 0000000..2ae7eb4 --- /dev/null +++ b/backend/src/user/dto/publicUser.dto.ts @@ -0,0 +1,4 @@ +import { PickType } from "@nestjs/swagger"; +import { UserDTO } from "./user.dto"; + +export class PublicUserDTO extends PickType(UserDTO, ["email"] as const) {}