[bug] Add processes as arg for parse_cipher
This commit is contained in:
parent
45a1478210
commit
6cd7fe3204
@ -542,8 +542,9 @@ export class Service {
|
|||||||
|
|
||||||
async parseCipher(message: string): Promise<void> {
|
async parseCipher(message: string): Promise<void> {
|
||||||
const membersList = this.getAllMembers();
|
const membersList = this.getAllMembers();
|
||||||
|
const processes = Object.fromEntries(this.getProcesses());
|
||||||
try {
|
try {
|
||||||
const apiReturn = wasm.parse_cipher(message, membersList);
|
const apiReturn = wasm.parse_cipher(message, membersList, processes);
|
||||||
await this.handleApiReturn(apiReturn);
|
await this.handleApiReturn(apiReturn);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Failed to parse cipher: ${e}`);
|
console.error(`Failed to parse cipher: ${e}`);
|
||||||
@ -708,8 +709,11 @@ export class Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Database method: Get All Processes
|
public getProcesses(): Map<string, Process> {
|
||||||
async getAllProcesses(): Promise<Record<string, any>> {
|
return this.processes;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getAllProcessesFromDb(): Promise<Record<string, any>> {
|
||||||
try {
|
try {
|
||||||
const db = await Database.getInstance();
|
const db = await Database.getInstance();
|
||||||
const processes = await db.dumpStore('processes');
|
const processes = await db.dumpStore('processes');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user