Browse Source

Merge branch 'dev_trustie' into dev_devops

tags/v1.0.0
Jasder 5 years ago
parent
commit
12bef27260
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      app/controllers/oauth/educoder_controller.rb
  2. +2
    -2
      app/controllers/repositories_controller.rb
  3. +1
    -1
      app/views/oauth/register.html.erb

+ 1
- 1
app/controllers/oauth/educoder_controller.rb View File

@@ -25,7 +25,7 @@ class Oauth::EducoderController < Oauth::BaseController

redirect_to callback_url
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
rescue WechatOauth::Error => ex


+ 2
- 2
app/controllers/repositories_controller.rb View File

@@ -41,9 +41,9 @@ class RepositoriesController < ApplicationController
interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref)
if interactor.success?
result = interactor.result
return @sub_entries = [] if result[:status] == -1
return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
@sub_entries = [] << result unless result.is_a? Array
@sub_entries = result.is_a?(Array) ? result : [result]
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
else
render_error(interactor.error)


+ 1
- 1
app/views/oauth/register.html.erb View File

@@ -11,7 +11,7 @@
</div>
<div class="indexInfo">
<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>
</div>
<div class="indexInfo">


Loading…
Cancel
Save