1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Mobile,Desktop: Resolves #11872: Explain why items could not be decrypted (#12048)

This commit is contained in:
Henry Heino
2025-04-07 12:03:55 -07:00
committed by GitHub
parent 59447f4c45
commit 338dabf5da
7 changed files with 399 additions and 114 deletions

View File

@@ -6,6 +6,13 @@ enum ValueType {
Text = 2,
}
interface KvStoreKeyValue {
key: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Partial refactoring of old code from before rule was applied
value: any;
type: ValueType;
}
export default class KvStore extends BaseService {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
@@ -110,7 +117,7 @@ export default class KvStore extends BaseService {
}
}
public async searchByPrefix(prefix: string) {
public async searchByPrefix(prefix: string): Promise<KvStoreKeyValue[]> {
const results = await this.db().selectAll('SELECT `key`, `value`, `type` FROM key_values WHERE `key` LIKE ?', [`${prefix}%`]);
return this.formatValues_(results);
}