From 7cb7dc712c37be482f1b8c7a26f442b00dcc058a Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:44:48 +0900 Subject: [PATCH] feature #13: MyRepositoryImpl --- .../and/data/repositoryimpl/MyRepositoryImpl.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt diff --git a/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt new file mode 100644 index 0000000..681c3ae --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt @@ -0,0 +1,14 @@ +package org.sopt.and.data.repositoryimpl + +import org.sopt.and.data.datasource.MyDataSource +import org.sopt.and.domain.entity.response.ResponseHobbyEntity +import org.sopt.and.domain.repository.MyRepository +import javax.inject.Inject + +class MyRepositoryImpl @Inject constructor( + private val myDataSource: MyDataSource +) : MyRepository { + override suspend fun getHobby(): Result = runCatching { + myDataSource.getUserHobby().result.toEntity() + } +}