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:
16
src/state/env/yandex_cloud.rs
vendored
Normal file
16
src/state/env/yandex_cloud.rs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::env;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct YandexCloudEnvData {
|
||||
pub api_key: String,
|
||||
pub func_id: String,
|
||||
}
|
||||
|
||||
impl Default for YandexCloudEnvData {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
api_key: env::var("YANDEX_CLOUD_API_KEY").expect("YANDEX_CLOUD_API_KEY must be set"),
|
||||
func_id: env::var("YANDEX_CLOUD_FUNC_ID").expect("YANDEX_CLOUD_FUNC_ID must be set"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user