创建文件的修改及其他后端bug
This commit is contained in:
parent
279521289e
commit
937cb04d4f
|
@ -1,26 +1,29 @@
|
||||||
json.total_count @total_count
|
json.total_count @total_count
|
||||||
json.projects do
|
json.projects do
|
||||||
json.array! @projects.to_a do |project|
|
json.array! @projects.to_a do |project|
|
||||||
json.partial! 'project', project: project
|
user = project.owner
|
||||||
json.author do
|
if user.present?
|
||||||
json.name project.owner.try(:show_real_name)
|
json.partial! 'project', project: project
|
||||||
json.login project.owner.login
|
json.author do
|
||||||
json.image_url url_to_avatar(project.owner)
|
json.name user.try(:show_real_name)
|
||||||
end
|
json.login user.login
|
||||||
json.category do
|
json.image_url url_to_avatar(project.owner)
|
||||||
if project.project_category.blank?
|
|
||||||
json.nil!
|
|
||||||
else
|
|
||||||
json.id project.project_category.id
|
|
||||||
json.name project.project_category.name
|
|
||||||
end
|
end
|
||||||
end
|
json.category do
|
||||||
json.language do
|
if project.project_category.blank?
|
||||||
if project.project_language.blank?
|
json.nil!
|
||||||
json.nil!
|
else
|
||||||
else
|
json.id project.project_category.id
|
||||||
json.id project.project_language.id
|
json.name project.project_category.name
|
||||||
json.name project.project_language.name
|
end
|
||||||
|
end
|
||||||
|
json.language do
|
||||||
|
if project.project_language.blank?
|
||||||
|
json.nil!
|
||||||
|
else
|
||||||
|
json.id project.project_language.id
|
||||||
|
json.name project.project_language.name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,10 +19,6 @@ Rails.application.routes.draw do
|
||||||
delete :destroy_files
|
delete :destroy_files
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :sync_forge, only: [:create] #同步用户
|
|
||||||
resources :composes do
|
|
||||||
resources :compose_projects, only: [:create, :destroy]
|
|
||||||
end
|
|
||||||
get 'home/index'
|
get 'home/index'
|
||||||
get 'home/search'
|
get 'home/search'
|
||||||
get 'main/first_stamp'
|
get 'main/first_stamp'
|
||||||
|
@ -48,8 +44,6 @@ Rails.application.routes.draw do
|
||||||
resources :project_languages, only: [:index, :show]
|
resources :project_languages, only: [:index, :show]
|
||||||
resources :ignores, only: [:index, :show]
|
resources :ignores, only: [:index, :show]
|
||||||
resources :licenses, only: [:index, :show]
|
resources :licenses, only: [:index, :show]
|
||||||
resources :disciplines, only: [:index]
|
|
||||||
resources :tag_disciplines, only: [:create]
|
|
||||||
|
|
||||||
resources :projects do
|
resources :projects do
|
||||||
resources :pull_requests, except: [:destroy] do
|
resources :pull_requests, except: [:destroy] do
|
||||||
|
@ -131,6 +125,7 @@ Rails.application.routes.draw do
|
||||||
resources :users do
|
resources :users do
|
||||||
member do
|
member do
|
||||||
get :homepage_info
|
get :homepage_info
|
||||||
|
get :projects
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
post :following
|
post :following
|
||||||
|
@ -147,25 +142,23 @@ Rails.application.routes.draw do
|
||||||
get :me
|
get :me
|
||||||
get :list
|
get :list
|
||||||
post :sync_token
|
post :sync_token
|
||||||
get :projects
|
|
||||||
post :sync_gitea_pwd
|
post :sync_gitea_pwd
|
||||||
post :sync_salt
|
post :sync_salt
|
||||||
end
|
end
|
||||||
|
|
||||||
scope module: :users do
|
scope module: :users do
|
||||||
resources :courses, only: [:index]
|
# resources :courses, only: [:index]
|
||||||
resources :projects, only: [:index]
|
resources :projects, only: [:index]
|
||||||
resources :subjects, only: [:index]
|
# resources :subjects, only: [:index]
|
||||||
resources :project_packages, only: [:index]
|
resources :project_packages, only: [:index]
|
||||||
# 私信
|
# 私信
|
||||||
resources :private_messages, only: [:index, :create, :destroy]
|
# resources :private_messages, only: [:index, :create, :destroy]
|
||||||
resources :recent_contacts, only: [:index]
|
# resources :recent_contacts, only: [:index]
|
||||||
resource :private_message_details, only: [:show]
|
# resource :private_message_details, only: [:show]
|
||||||
resource :unread_message_info, only: [:show]
|
# resource :unread_message_info, only: [:show]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
resource :trial_apply, only: [:create]
|
|
||||||
resources :projects, module: :users, only: [] do
|
resources :projects, module: :users, only: [] do
|
||||||
get :search, on: :collection
|
get :search, on: :collection
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
"./static/js/174.23eb263b.chunk.js": "./static/js/174.23eb263b.chunk.js",
|
"./static/js/174.23eb263b.chunk.js": "./static/js/174.23eb263b.chunk.js",
|
||||||
"./static/js/175.978237cd.chunk.js": "./static/js/175.978237cd.chunk.js",
|
"./static/js/175.978237cd.chunk.js": "./static/js/175.978237cd.chunk.js",
|
||||||
"./static/js/176.6a70c7ca.chunk.js": "./static/js/176.6a70c7ca.chunk.js",
|
"./static/js/176.6a70c7ca.chunk.js": "./static/js/176.6a70c7ca.chunk.js",
|
||||||
"./static/js/177.5af460de.chunk.js": "./static/js/177.5af460de.chunk.js",
|
"./static/js/177.babfb8a0.chunk.js": "./static/js/177.babfb8a0.chunk.js",
|
||||||
"./static/js/178.ca78bfb7.chunk.js": "./static/js/178.ca78bfb7.chunk.js",
|
"./static/js/178.ca78bfb7.chunk.js": "./static/js/178.ca78bfb7.chunk.js",
|
||||||
"./static/js/179.d209043e.chunk.js": "./static/js/179.d209043e.chunk.js",
|
"./static/js/179.d209043e.chunk.js": "./static/js/179.d209043e.chunk.js",
|
||||||
"./static/js/18.59166b96.chunk.js": "./static/js/18.59166b96.chunk.js",
|
"./static/js/18.59166b96.chunk.js": "./static/js/18.59166b96.chunk.js",
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
"./static/js/19.e9122038.chunk.js": "./static/js/19.e9122038.chunk.js",
|
"./static/js/19.e9122038.chunk.js": "./static/js/19.e9122038.chunk.js",
|
||||||
"./static/js/190.a972b289.chunk.js": "./static/js/190.a972b289.chunk.js",
|
"./static/js/190.a972b289.chunk.js": "./static/js/190.a972b289.chunk.js",
|
||||||
"./static/js/191.91c8d4dd.chunk.js": "./static/js/191.91c8d4dd.chunk.js",
|
"./static/js/191.91c8d4dd.chunk.js": "./static/js/191.91c8d4dd.chunk.js",
|
||||||
"./static/js/192.0f905343.chunk.js": "./static/js/192.0f905343.chunk.js",
|
"./static/js/192.e5902a9e.chunk.js": "./static/js/192.e5902a9e.chunk.js",
|
||||||
"./static/js/193.2db797e4.chunk.js": "./static/js/193.2db797e4.chunk.js",
|
"./static/js/193.2db797e4.chunk.js": "./static/js/193.2db797e4.chunk.js",
|
||||||
"./static/js/194.570ec7dc.chunk.js": "./static/js/194.570ec7dc.chunk.js",
|
"./static/js/194.570ec7dc.chunk.js": "./static/js/194.570ec7dc.chunk.js",
|
||||||
"./static/js/195.8bafb8cc.chunk.js": "./static/js/195.8bafb8cc.chunk.js",
|
"./static/js/195.8bafb8cc.chunk.js": "./static/js/195.8bafb8cc.chunk.js",
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
"./static/js/61.f63d91e7.chunk.js": "./static/js/61.f63d91e7.chunk.js",
|
"./static/js/61.f63d91e7.chunk.js": "./static/js/61.f63d91e7.chunk.js",
|
||||||
"./static/js/62.b83b97dc.chunk.js": "./static/js/62.b83b97dc.chunk.js",
|
"./static/js/62.b83b97dc.chunk.js": "./static/js/62.b83b97dc.chunk.js",
|
||||||
"./static/js/63.8e25338f.chunk.js": "./static/js/63.8e25338f.chunk.js",
|
"./static/js/63.8e25338f.chunk.js": "./static/js/63.8e25338f.chunk.js",
|
||||||
"./static/js/64.571f8ba1.chunk.js": "./static/js/64.571f8ba1.chunk.js",
|
"./static/js/64.d1514b70.chunk.js": "./static/js/64.d1514b70.chunk.js",
|
||||||
"./static/js/65.f2e7b8f6.chunk.js": "./static/js/65.f2e7b8f6.chunk.js",
|
"./static/js/65.f2e7b8f6.chunk.js": "./static/js/65.f2e7b8f6.chunk.js",
|
||||||
"./static/js/66.ab5a4b68.chunk.js": "./static/js/66.ab5a4b68.chunk.js",
|
"./static/js/66.ab5a4b68.chunk.js": "./static/js/66.ab5a4b68.chunk.js",
|
||||||
"./static/js/67.24cbd43e.chunk.js": "./static/js/67.24cbd43e.chunk.js",
|
"./static/js/67.24cbd43e.chunk.js": "./static/js/67.24cbd43e.chunk.js",
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
"./static/js/98.1709d8a8.chunk.js": "./static/js/98.1709d8a8.chunk.js",
|
"./static/js/98.1709d8a8.chunk.js": "./static/js/98.1709d8a8.chunk.js",
|
||||||
"./static/js/99.07307f5a.chunk.js": "./static/js/99.07307f5a.chunk.js",
|
"./static/js/99.07307f5a.chunk.js": "./static/js/99.07307f5a.chunk.js",
|
||||||
"main.css": "./static/css/main.fd229636.css",
|
"main.css": "./static/css/main.fd229636.css",
|
||||||
"main.js": "./static/js/main.34f36826.js",
|
"main.js": "./static/js/main.74c68624.js",
|
||||||
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
|
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
|
||||||
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
|
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
|
||||||
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",
|
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
_host = 'https://ali-cdn.educoder.net/react/build/'
|
_host = 'https://ali-cdn.educoder.net/react/build/'
|
||||||
}
|
}
|
||||||
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\/script>');
|
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\/script>');
|
||||||
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.34f36826.js"><\/script>');
|
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.74c68624.js"><\/script>');
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
<script>!function(){var t=location.href;"3007"===window.location.port?-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>'):-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')}()</script><script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script></body></html>
|
<script>!function(){var t=location.href;"3007"===window.location.port?-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>'):-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')}()</script><script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue