Skip to content

Instantly share code, notes, and snippets.

View RahulAwasthi314's full-sized avatar
🎯
FOCUSSING

Rahul Awasthi RahulAwasthi314

🎯
FOCUSSING
View GitHub Profile
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)
@RahulAwasthi314
RahulAwasthi314 / user.mongodb.js
Created May 18, 2024 13:42
MongoDB playground file
// 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
//