You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import BaseModel from '../BaseModel';
|
||||
import BaseModel, { DeleteOptions } from '../BaseModel';
|
||||
import { ResourceLocalStateEntity } from '../services/database/types';
|
||||
import Database from '../database';
|
||||
import ActionLogger from '../utils/ActionLogger';
|
||||
|
||||
export default class ResourceLocalState extends BaseModel {
|
||||
public static tableName() {
|
||||
@ -34,9 +35,11 @@ export default class ResourceLocalState extends BaseModel {
|
||||
return this.db().transactionExecBatch(this.saveQueries(o));
|
||||
}
|
||||
|
||||
public static batchDelete(ids: string[], options: any = null) {
|
||||
options = options ? { ...options } : {};
|
||||
public static batchDelete(ids: string[], options: DeleteOptions = {}) {
|
||||
options = { ...options };
|
||||
options.idFieldName = 'resource_id';
|
||||
options.sourceDescription = ActionLogger.from(options.sourceDescription);
|
||||
options.sourceDescription.addDescription('Delete local resource state');
|
||||
return super.batchDelete(ids, options);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user