.
This commit is contained in:
parent
3c4702b0b0
commit
c593490cec
@ -57,11 +57,13 @@ object NetworkDataSource {
|
||||
else if (response.status == HttpStatusCode.Unauthorized) {
|
||||
error("Неверный логин или пароль")
|
||||
}
|
||||
Log.e("getToken", response.status.toString())
|
||||
response.body<String>()
|
||||
}
|
||||
}
|
||||
suspend fun checkAuth(token: String): Result<Boolean> = withContext(Dispatchers.IO) {
|
||||
return@withContext runCatching {
|
||||
Log.e("token", token)
|
||||
val response = client.get(getUrl(token, Constants.AUTH_URL))
|
||||
when (response.status) {
|
||||
HttpStatusCode.OK -> true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package ru.myitschool.work.ui.screen.auth
|
||||
|
||||
import android.util.Log
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package ru.myitschool.work.ui.screen.auth
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
package ru.myitschool.work.ui.screen.main
|
||||
|
||||
object MeetingResult {
|
||||
const val REFRESH_STATUS = "refresh_status"
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.screen.meetings
|
||||
|
||||
class MeetingIntent {
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.screen.meetings
|
||||
|
||||
class MeetingsAction {
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.screen.meetings
|
||||
|
||||
class MeetingsScreen {
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.screen.meetings
|
||||
|
||||
class MeetingsState {
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.screen.meetings
|
||||
|
||||
class MeetingsViewModel {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user