daemon: adds conversation list limit, fixes auth saving in db auth store
This commit is contained in:
@@ -54,10 +54,10 @@ impl AuthenticationStore for DatabaseAuthenticationStore {
|
||||
}).await
|
||||
}
|
||||
|
||||
async fn get_token(&mut self) -> Option<JwtToken> {
|
||||
async fn get_token(&mut self) -> Option<String> {
|
||||
self.database.lock().await
|
||||
.with_settings(|settings| {
|
||||
match settings.get::<JwtToken>(SettingsKey::TOKEN) {
|
||||
match settings.get::<String>(SettingsKey::TOKEN) {
|
||||
Ok(token) => token,
|
||||
Err(e) => {
|
||||
log::warn!("Failed to get token from settings: {}", e);
|
||||
@@ -67,7 +67,7 @@ impl AuthenticationStore for DatabaseAuthenticationStore {
|
||||
}).await
|
||||
}
|
||||
|
||||
async fn set_token(&mut self, token: JwtToken) {
|
||||
async fn set_token(&mut self, token: String) {
|
||||
self.database.lock().await
|
||||
.with_settings(|settings| settings.put(SettingsKey::TOKEN, &token)).await.unwrap_or_else(|e| {
|
||||
log::error!("Failed to set token: {}", e);
|
||||
|
||||
Reference in New Issue
Block a user