fix: functionality

This commit is contained in:
Mo
2023-05-10 07:19:02 -05:00
parent add91d8c0c
commit dbd0acab2c
15 changed files with 66 additions and 42 deletions
@@ -2,7 +2,7 @@ import { ItemShare } from '../../ItemShare/ItemShare'
import { ItemShareServiceInterface } from '../../ItemShare/ItemShareServiceInterface'
import { UseCaseInterface } from '../UseCaseInterface'
export type GetItemSharesResponse =
export type GetUserItemSharesResponse =
| {
success: true
itemShares: ItemShare[]
@@ -12,10 +12,10 @@ export type GetItemSharesResponse =
message: string
}
export class GetItemSharesUseCase implements UseCaseInterface {
export class GetUserItemSharesUseCase implements UseCaseInterface {
constructor(private itemShareService: ItemShareServiceInterface) {}
async execute(dto: { userUuid: string }): Promise<GetItemSharesResponse> {
async execute(dto: { userUuid: string }): Promise<GetUserItemSharesResponse> {
const result = await this.itemShareService.getUserItemShares(dto.userUuid)
if (result === null) {