Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up members isPaid flag in settings table #11651

Merged
merged 5 commits into from
Mar 16, 2020

Conversation

naz
Copy link
Contributor

@naz naz commented Mar 10, 2020

While working on #11650 spotted this flag and decided to do a lil cleanup while in the area.

The isPaid flag is no longer used and can be removed to make the settings JSON easier to read

TODO:

naz added a commit to naz/Ghost-Admin that referenced this pull request Mar 10, 2020
refs TryGhost/Ghost#11651

- The flag is being removed from the backend, so can be safely removed on client as well
naz added 2 commits March 11, 2020 15:57
refs TryGhost#11650

- The flag is no longer used and can be removed to make the settings JSON easier to read
@naz naz force-pushed the members-clean-up-is-paid-flag branch from 8e51242 to 9efdd55 Compare March 11, 2020 09:54
paymentProcessor => paymentProcessor.adapter === 'stripe'
);

if (stripePaymentProcessor && stripePaymentProcessor.config.public_token && stripePaymentProcessor.config.secret_token) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allouis does this logic make sense to you? Couldn't find any concrete reference to equivalent of this flag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might wanna doublecheck with @rishabhgrg who introduced the flag, too ☺️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gargol Think this is fine, isPaid was to mark if stripe setup is present or not so this should ideally cover it. 🤔

@rishabhgrg rishabhgrg self-requested a review March 12, 2020 12:35
const settingsKey = 'members_subscription_settings';

return localOptions
.transacting('settings')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this not be more specific like:

.transacting('settings')
.where('key', settingsKey)
.select('value')
.first()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! I like it. Will redo the query 👍

@naz naz merged commit 6a9b53f into TryGhost:master Mar 16, 2020
@naz naz deleted the members-clean-up-is-paid-flag branch March 16, 2020 05:36
naz added a commit to naz/Ghost-Admin that referenced this pull request Mar 16, 2020
refs TryGhost/Ghost#11651

- The flag is being removed from the backend, so can be safely removed on client as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants