From 275127715437f1ce68f8e347bfe96abd2c35dd1a Mon Sep 17 00:00:00 2001 From: Tatsuto YAMAMOTO Date: Sat, 27 Jul 2024 11:19:27 +0900 Subject: [PATCH] fix: use direct return, add ToDo comment --- pkg/timeline/adaptor/controller/timeline.ts | 1 + pkg/timeline/service/fetchMember.ts | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/timeline/adaptor/controller/timeline.ts b/pkg/timeline/adaptor/controller/timeline.ts index 620c6ed0..b66a57a5 100644 --- a/pkg/timeline/adaptor/controller/timeline.ts +++ b/pkg/timeline/adaptor/controller/timeline.ts @@ -145,6 +145,7 @@ export class TimelineController { id: v.getID(), name: v.getName(), nickname: v.getNickname(), + // ToDo: fill avatar URL avatar: '', }; }); diff --git a/pkg/timeline/service/fetchMember.ts b/pkg/timeline/service/fetchMember.ts index 079f7057..ce9a720d 100644 --- a/pkg/timeline/service/fetchMember.ts +++ b/pkg/timeline/service/fetchMember.ts @@ -19,11 +19,6 @@ export class FetchListMemberService { } const unwrappedAccountID = Result.unwrap(list); - const accounts = await this.accountModule.fetchAccounts(unwrappedAccountID); - if (Result.isErr(accounts)) { - return accounts; - } - - return Result.ok(Result.unwrap(accounts)); + return await this.accountModule.fetchAccounts(unwrappedAccountID); } }