Skip to content

Commit

Permalink
feat: Add resend email code api call to the button
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Dec 17, 2024
1 parent 07fef3a commit ec33f4e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.infomaniak.swisstransfer.ui.screen.newtransfer.validateemail

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.infomaniak.multiplatform_swisstransfer.managers.UploadManager
import com.infomaniak.multiplatform_swisstransfer.network.exceptions.EmailValidationException
import com.infomaniak.multiplatform_swisstransfer.network.models.upload.request.VerifyEmailCodeBody
import com.infomaniak.multiplatform_swisstransfer.network.repositories.UploadRepository
Expand All @@ -33,6 +34,7 @@ import javax.inject.Inject
@HiltViewModel
class ValidateUserEmailViewModel @Inject constructor(
@IoDispatcher private val ioDispatcher: CoroutineDispatcher,
private val uploadManager: UploadManager
) : ViewModel() {

private val uploadRepository: UploadRepository by lazy { UploadRepository() }
Expand Down Expand Up @@ -66,7 +68,7 @@ class ValidateUserEmailViewModel @Inject constructor(

fun resendEmailCode(email: String) {
viewModelScope.launch(ioDispatcher) {
// TODO //uploadRepository.resendEmailCode(ResendEmailCodeBody(email, ))
uploadManager.resendEmailCode(email)
}
}

Expand Down

0 comments on commit ec33f4e

Please sign in to comment.