From bef7e083857d4e21d17ccb86bed37f8895a5dcf2 Mon Sep 17 00:00:00 2001 From: domingo1021 Date: Sat, 6 Jul 2024 16:36:40 +0800 Subject: [PATCH] fix: fix JSdoc, from Array to Hero only --- src/modules/hero/hero.repository.impl.ts | 4 ++-- src/modules/hero/hero.service.ts | 2 +- src/modules/http/http.service.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/hero/hero.repository.impl.ts b/src/modules/hero/hero.repository.impl.ts index 2c9ef26..4984464 100644 --- a/src/modules/hero/hero.repository.impl.ts +++ b/src/modules/hero/hero.repository.impl.ts @@ -58,7 +58,7 @@ export class HeroRepositoryImpl implements HeroRepository { /** * @description Get single hero in cache-aside strategy: get cache first, if not exist, fetch from external API. - * @returns {Promise>} + * @returns {Promise} * @throws {InternalServerErrorException} */ async getHeroById(id: string): Promise { @@ -76,7 +76,7 @@ export class HeroRepositoryImpl implements HeroRepository { /** * @description Get single hero with profile in cache-aside strategy: get cache first, if not exist, fetch from external API. - * @returns {Promise>} + * @returns {Promise} * @throws {InternalServerErrorException} */ async getHeroWithProfileById(id: string): Promise { diff --git a/src/modules/hero/hero.service.ts b/src/modules/hero/hero.service.ts index 55dcf1e..59cb99e 100644 --- a/src/modules/hero/hero.service.ts +++ b/src/modules/hero/hero.service.ts @@ -22,7 +22,7 @@ export class HeroService { * @description Get single heroes with profile if authenticated, otherwise get single heroes only * @param {string} id - Hero ID * @param {boolean} isAuthenticated - Flag to determine if hero profile should be fetched - * @returns {Promise>} + * @returns {Promise} * @throws {InternalServerErrorException} */ async findById(id: string, isAuthenticated: boolean = false): Promise { diff --git a/src/modules/http/http.service.ts b/src/modules/http/http.service.ts index 7a2e6e3..1464c25 100644 --- a/src/modules/http/http.service.ts +++ b/src/modules/http/http.service.ts @@ -49,7 +49,7 @@ export class ExternalHttpService { /** * @description Get single hero from external api, throw if response is in invalid format / network error. - * @returns {Promise>} + * @returns {Promise} * @throws {InternalServerErrorException} */ async getHeroById(id: string): Promise { @@ -84,7 +84,7 @@ export class ExternalHttpService { /** * @description Get single hero profile, throw if response is in invalid format / network error. - * @returns {Promise>} + * @returns {Promise} * @throws {InternalServerErrorException} */ async getHeroProfileById(id: string): Promise {