From 56a2fae26f525942e80f8f4cd51c77fecf8c216c Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 2 Dec 2019 16:53:06 -0600 Subject: [PATCH] Revert "Temp disable account upgrades." This reverts commit c4cdba0874ba473cb2f22e2e124b2fe046183c70. --- app/controllers/user_upgrades_controller.rb | 2 -- app/views/user_upgrades/new.html.erb | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/user_upgrades_controller.rb b/app/controllers/user_upgrades_controller.rb index d87c9ecf6..1c01cc0e0 100644 --- a/app/controllers/user_upgrades_controller.rb +++ b/app/controllers/user_upgrades_controller.rb @@ -4,8 +4,6 @@ class UserUpgradesController < ApplicationController skip_before_action :verify_authenticity_token, only: [:create] def create - raise NotImplementedError - if params[:stripeToken] create_stripe end diff --git a/app/views/user_upgrades/new.html.erb b/app/views/user_upgrades/new.html.erb index d27c9a395..efcc9d25d 100644 --- a/app/views/user_upgrades/new.html.erb +++ b/app/views/user_upgrades/new.html.erb @@ -92,16 +92,14 @@ <% end %>
- <% if true %> -

Account upgrades are temporarily disabled. Upgrades will be available again after December 1st.

- <% elsif params[:user_id] %> + <% if params[:user_id] %>

You are gifting this account upgrade to <%= link_to user.pretty_name, user_path(params[:user_id]) %>.

<% else %>

You can also upgrade someone else's account for the same price. The easiest way is to go to their profile page and look for a "Gift Upgrade" link.

<% end %>
- <% if false %> + <% if Danbooru.config.stripe_publishable_key %> <% if CurrentUser.is_anonymous? %>

<%= link_to "Sign up", new_user_path %> or <%= link_to "login", new_session_path(url: new_user_upgrade_path) %> first to upgrade your account.

<% elsif CurrentUser.safe_mode? %>