internal: change password preprocessing step (#2347)
This commit is contained in:
14
packages/services/src/Domain/UseCase/RemoveItemsLocally.ts
Normal file
14
packages/services/src/Domain/UseCase/RemoveItemsLocally.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { StorageServiceInterface } from '../Storage/StorageServiceInterface'
|
||||
import { ItemManagerInterface } from '../Item/ItemManagerInterface'
|
||||
import { AnyItemInterface } from '@standardnotes/models'
|
||||
import { Uuids } from '@standardnotes/utils'
|
||||
|
||||
export class RemoveItemsLocallyUseCase {
|
||||
constructor(private readonly items: ItemManagerInterface, private readonly storage: StorageServiceInterface) {}
|
||||
|
||||
async execute(items: AnyItemInterface[]): Promise<void> {
|
||||
this.items.removeItemsLocally(items)
|
||||
|
||||
await this.storage.deletePayloadsWithUuids(Uuids(items))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user