This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthRepository @Inject constructor(private val authAPI: AuthAPI) { | |
// remote or local data source | |
private val _authResponseLiveData = MutableLiveData<Response>() | |
val authResponseLiveData : LiveData<Response> | |
get() = _authResponseLiveData | |
suspend fun register(userRegistrationRequestDto: RegistrationRequestDto) { | |
_authResponseLiveData.postValue(Response.Loading()) | |
val response = authAPI.register(registrationRequestDto = userRegistrationRequestDto) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample mongo file for playground purpose | |
// create a collection in mongoDB named 'user' | |
db.createCollection("user"); | |
// get all the collections present in the document | |
db.getCollectionInfos(); | |
/// CREATE | |
// |