修复:处理owners .json后缀

This commit is contained in:
yystopf 2024-10-08 10:22:13 +08:00
parent 65a7af3d6e
commit ea76beb1bf
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ class OwnersController < ApplicationController
end
def show
@owner = Owner.find_by(login: params[:id]) || Owner.find_by(id: params[:id])
login = params[:id].to_s[0..-6]
@owner = Owner.find_by(login: login) || Owner.find_by(id: login)
clear_user_cookie unless @owner.present?
return render_not_found unless @owner.present?
# 组织