Merge branch 'dev_trustie' of http://git.trustie.net/jasder/forgeplus into dev_trustie

This commit is contained in:
sylor_huang@126.com 2020-09-18 17:16:48 +08:00
commit a839b2d216
3 changed files with 6 additions and 4 deletions

View File

@ -25,7 +25,7 @@ class Oauth::EducoderController < Oauth::BaseController
redirect_to callback_url redirect_to callback_url
else else
redirect_to oauth_register_path(login: login, callback_url: callback_url) redirect_to oauth_register_path(login: login, mail: mail, callback_url: callback_url)
end end
end end
rescue WechatOauth::Error => ex rescue WechatOauth::Error => ex

View File

@ -40,8 +40,10 @@ class RepositoriesController < ApplicationController
file_path_uri = URI.parse(URI.encode(params[:filepath].to_s.strip)) file_path_uri = URI.parse(URI.encode(params[:filepath].to_s.strip))
interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref) interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref)
if interactor.success? if interactor.success?
@sub_entries = interactor.result result = interactor.result
@sub_entries = [] << @sub_entries unless @sub_entries.is_a? Array return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
@sub_entries = result.is_a?(Array) ? result : [result]
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] } @sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
else else
render_error(interactor.error) render_error(interactor.error)

View File

@ -11,7 +11,7 @@
</div> </div>
<div class="indexInfo"> <div class="indexInfo">
<span>邮箱:</span> <span>邮箱:</span>
<%= text_field_tag :mail, '', placeholder: '请输入绑定邮箱', maxlength: 40, id: 'email' %> <%= text_field_tag :mail, params[:mail], placeholder: '请输入绑定邮箱', maxlength: 40, id: 'email' %>
<p class="checkInfo emailCheck"><span></span></p> <p class="checkInfo emailCheck"><span></span></p>
</div> </div>
<div class="indexInfo"> <div class="indexInfo">