-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change return from token to authorized meetacy api
- Loading branch information
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,5 @@ public class MeetacyApi( | |
return AuthorizedMeetacyApi(token, base = this) | ||
} | ||
|
||
|
||
|
||
public companion object | ||
} |
This file contains 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
6 changes: 4 additions & 2 deletions
6
api/src/commonMain/kotlin/app/meetacy/sdk/auth/telegram/AuthTelegramApi.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package app.meetacy.sdk.auth.telegram | ||
|
||
import app.meetacy.sdk.AuthorizedMeetacyApi | ||
import app.meetacy.sdk.MeetacyApi | ||
import app.meetacy.sdk.engine.requests.AwaitTelegramAuthRequest | ||
import app.meetacy.sdk.types.auth.Token | ||
|
||
public class AuthTelegramApi(private val api: MeetacyApi) { | ||
public suspend fun await(temporalToken: Token): Token { | ||
return api.engine.execute(AwaitTelegramAuthRequest(temporalToken)).permanentToken | ||
public suspend fun await(temporalToken: Token): AuthorizedMeetacyApi { | ||
val token = api.engine.execute(AwaitTelegramAuthRequest(temporalToken)).permanentToken | ||
return api.authorized(token) | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
api/src/commonMain/kotlin/app/meetacy/sdk/engine/MeetacyRequestsEngine.kt
This file contains 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