1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

refactor: remove unused UserController#join method

هذا الالتزام موجود في:
Adam Cooke
2024-03-04 14:42:32 +00:00
الأصل e05f0b3616
التزام 1ca18dbc6e

عرض الملف

@@ -28,26 +28,6 @@ class UserController < ApplicationController
end
end
def join
if @invite = UserInvite.where(uuid: params[:token]).where("expires_at > ?", Time.now).first
if logged_in?
if request.post?
@invite.accept(current_user)
redirect_to_with_json root_path(nrd: 1), notice: "Invitation has been accepted successfully. You now have access to this organization."
elsif request.delete?
@invite.reject
redirect_to_with_json root_path(nrd: 1), notice: "Invitation has been rejected successfully."
else
@organizations = @invite.organizations.order(:name).to_a
end
else
redirect_to new_signup_path(params[:token])
end
else
redirect_to_with_json root_path(nrd: 1), alert: "The invite URL you have has expired. Please ask the person who invited you to re-send your invitation."
end
end
def update
@user = User.find(current_user.id)
@user.attributes = params.require(:user).permit(:first_name, :last_name, :time_zone, :email_address, :password, :password_confirmation)