We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8164dad commit cb42dbdCopy full SHA for cb42dbd
server/helpers/post.helper.js
@@ -5,7 +5,7 @@ import { getAdFreeMp3 } from '../helpers/mp3.helper';
5
import { getPrivateRss } from '../helpers/rss.helper';
6
7
function replaceWithAdFree(post, fullUser) {
8
- post.mp3 = getAdFreeMp3(post.mp3) // eslint-disable-line
+ post.mp3 = post.adFreeMp3 || getAdFreeMp3(post.mp3) // eslint-disable-line
9
post.rss = getPrivateRss(fullUser) // eslint-disable-line
10
}
11
@@ -64,6 +64,8 @@ async function addPostData(post, fullUser) {
64
65
if (fullUser && fullUser.subscription && fullUser.subscription.active) {
66
replaceWithAdFree(post, fullUser);
67
+ } else {
68
+ post.adFreeMp3 = null; // eslint-disable-line
69
70
71
return post;
0 commit comments