Removed unused bulkRemoveTags

no issue

This bulk action is not used at the moment.
This commit is contained in:
Simon Backx 2023-04-27 14:56:28 +02:00
parent f5446bea46
commit 1ff71dc36c

View File

@ -169,33 +169,6 @@ class PostsService {
};
}
/**
* @param {object} data
* @param {string[]} data.tags - Array of tag ids to add to the post
* @param {object} options
* @param {string} options.filter - An NQL Filter
*/
async #bulkRemoveTags(data, options) {
if (!options.transacting) {
return await this.models.Post.transaction(async (transacting) => {
return await this.#bulkRemoveTags(data, {
...options,
transacting
});
});
}
const postRows = await this.models.Post.getFilteredCollectionQuery({
filter: options.filter,
status: 'all',
transacting: options.transacting
}).select('posts.id');
await options.transacting('posts_tags').whereIn('post_id', postRows.map(post => post.id)).whereIn('tag_id', data.tags).del();
return true;
}
async bulkDestroy(options) {
if (!options.transacting) {
return await this.models.Post.transaction(async (transacting) => {