fix: update post cache clearing logic to call helper function

regression from 8cf9617630
This commit is contained in:
Julian Lam
2024-05-28 12:01:30 -04:00
parent f2e43e894b
commit 547fc17dcf
3 changed files with 4 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ postsAPI.purge = async function (caller, data) {
if (!canPurge) {
throw new Error('[[error:no-privileges]]');
}
require('../posts/cache').del(data.pid);
posts.clearCachedPost(data.pid);
await Promise.all([
posts.purge(data.pid, caller.uid),
require('.').activitypub.delete.note(caller, { pid: data.pid }),