You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
844 B
TypeScript
21 lines
844 B
TypeScript
import { AsyncObjectWrapper, ConfigDumpDataNode, ConfigDumpRow } from '../../types/sqlSharedTypes';
|
|
// eslint-disable-next-line import/no-unresolved, import/extensions
|
|
import { ConfigWrapperObjectTypes } from '../../webworker/workers/browser/libsession_worker_functions';
|
|
import { channels } from '../channels';
|
|
import { cleanData } from '../dataUtils';
|
|
|
|
export const ConfigDumpData: AsyncObjectWrapper<ConfigDumpDataNode> = {
|
|
getByVariantAndPubkey: (variant: ConfigWrapperObjectTypes, pubkey: string) => {
|
|
return channels.getByVariantAndPubkey(variant, pubkey);
|
|
},
|
|
saveConfigDump: (dump: ConfigDumpRow) => {
|
|
return channels.saveConfigDump(cleanData(dump));
|
|
},
|
|
getAllDumpsWithData: () => {
|
|
return channels.getAllDumpsWithData();
|
|
},
|
|
getAllDumpsWithoutData: () => {
|
|
return channels.getAllDumpsWithoutData();
|
|
},
|
|
};
|