mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-08 10:38:57 +03:00
feat!: add telegram auth and async refactor
- Removed "/schedule/update-download-url" endpoint, this mechanism was replaced by Yandex Cloud FaaS. Ура :) - Improved schedule caching mechanism. - Added Telegram WebApp authentication support. - Reworked endpoints responses and errors mechanism. - Refactored application state management. - Make synchronous database operations, middlewares and extractors to asynchronous. - Made user password field optional to support multiple auth methods. - Renamed users table column "version" to "android_version" and made it nullable.
This commit is contained in:
@@ -38,22 +38,25 @@ pub struct User {
|
||||
pub username: String,
|
||||
|
||||
/// BCrypt password hash.
|
||||
pub password: String,
|
||||
pub password: Option<String>,
|
||||
|
||||
/// ID of the linked VK account.
|
||||
pub vk_id: Option<i32>,
|
||||
|
||||
/// JWT access token.
|
||||
pub access_token: String,
|
||||
pub access_token: Option<String>,
|
||||
|
||||
/// Group.
|
||||
pub group: String,
|
||||
pub group: Option<String>,
|
||||
|
||||
/// Role.
|
||||
pub role: UserRole,
|
||||
|
||||
/// Version of the installed Polytechnic+ application.
|
||||
pub version: String,
|
||||
pub android_version: Option<String>,
|
||||
|
||||
/// ID of the linked Telegram account.
|
||||
pub telegram_id: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
|
||||
Reference in New Issue
Block a user