创建文件的修改及其他后端bug
This commit is contained in:
		
							parent
							
								
									279521289e
								
							
						
					
					
						commit
						937cb04d4f
					
				| 
						 | 
				
			
			@ -1,26 +1,29 @@
 | 
			
		|||
json.total_count @total_count
 | 
			
		||||
json.projects do
 | 
			
		||||
  json.array! @projects.to_a do |project|
 | 
			
		||||
    json.partial! 'project', project: project
 | 
			
		||||
    json.author do
 | 
			
		||||
      json.name project.owner.try(:show_real_name)
 | 
			
		||||
      json.login project.owner.login
 | 
			
		||||
      json.image_url url_to_avatar(project.owner)
 | 
			
		||||
    end
 | 
			
		||||
    json.category do
 | 
			
		||||
      if project.project_category.blank?
 | 
			
		||||
        json.nil!
 | 
			
		||||
      else
 | 
			
		||||
        json.id project.project_category.id
 | 
			
		||||
        json.name project.project_category.name
 | 
			
		||||
    user = project.owner
 | 
			
		||||
    if user.present?
 | 
			
		||||
      json.partial! 'project', project: project
 | 
			
		||||
      json.author do
 | 
			
		||||
        json.name user.try(:show_real_name)
 | 
			
		||||
        json.login user.login
 | 
			
		||||
        json.image_url url_to_avatar(project.owner)
 | 
			
		||||
      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
 | 
			
		||||
      json.category do
 | 
			
		||||
        if project.project_category.blank?
 | 
			
		||||
          json.nil!
 | 
			
		||||
        else
 | 
			
		||||
          json.id project.project_category.id
 | 
			
		||||
          json.name project.project_category.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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,10 +19,6 @@ Rails.application.routes.draw do
 | 
			
		|||
        delete :destroy_files
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    resources :sync_forge, only: [:create]  #同步用户
 | 
			
		||||
    resources :composes do
 | 
			
		||||
      resources :compose_projects, only: [:create, :destroy]
 | 
			
		||||
    end
 | 
			
		||||
    get 'home/index'
 | 
			
		||||
    get 'home/search'
 | 
			
		||||
    get 'main/first_stamp'
 | 
			
		||||
| 
						 | 
				
			
			@ -48,8 +44,6 @@ Rails.application.routes.draw do
 | 
			
		|||
    resources :project_languages, only: [:index, :show]
 | 
			
		||||
    resources :ignores, only: [:index, :show]
 | 
			
		||||
    resources :licenses, only: [:index, :show]
 | 
			
		||||
    resources :disciplines, only: [:index]
 | 
			
		||||
    resources :tag_disciplines, only: [:create]
 | 
			
		||||
 | 
			
		||||
    resources :projects do
 | 
			
		||||
      resources :pull_requests, except: [:destroy] do
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +125,7 @@ Rails.application.routes.draw do
 | 
			
		|||
    resources :users do
 | 
			
		||||
      member do
 | 
			
		||||
        get :homepage_info
 | 
			
		||||
        get :projects
 | 
			
		||||
      end
 | 
			
		||||
      collection do
 | 
			
		||||
        post :following
 | 
			
		||||
| 
						 | 
				
			
			@ -147,25 +142,23 @@ Rails.application.routes.draw do
 | 
			
		|||
        get :me
 | 
			
		||||
        get :list
 | 
			
		||||
        post :sync_token
 | 
			
		||||
        get :projects
 | 
			
		||||
        post :sync_gitea_pwd
 | 
			
		||||
        post :sync_salt
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      scope module: :users do
 | 
			
		||||
        resources :courses, only: [:index]
 | 
			
		||||
        # resources :courses, only: [:index]
 | 
			
		||||
        resources :projects, only: [:index]
 | 
			
		||||
        resources :subjects, only: [:index]
 | 
			
		||||
        # resources :subjects, only: [:index]
 | 
			
		||||
        resources :project_packages, only: [:index]
 | 
			
		||||
        # 私信
 | 
			
		||||
        resources :private_messages, only: [:index, :create, :destroy]
 | 
			
		||||
        resources :recent_contacts, only: [:index]
 | 
			
		||||
        resource :private_message_details, only: [:show]
 | 
			
		||||
        resource :unread_message_info, only: [:show]
 | 
			
		||||
        # resources :private_messages, only: [:index, :create, :destroy]
 | 
			
		||||
        # resources :recent_contacts, only: [:index]
 | 
			
		||||
        # resource :private_message_details, only: [:show]
 | 
			
		||||
        # resource :unread_message_info, only: [:show]
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      resource :trial_apply, only: [:create]
 | 
			
		||||
      resources :projects, module: :users, only: [] do
 | 
			
		||||
        get :search, on: :collection
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@
 | 
			
		|||
  "./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/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/179.d209043e.chunk.js": "./static/js/179.d209043e.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/190.a972b289.chunk.js": "./static/js/190.a972b289.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/194.570ec7dc.chunk.js": "./static/js/194.570ec7dc.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/62.b83b97dc.chunk.js": "./static/js/62.b83b97dc.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/66.ab5a4b68.chunk.js": "./static/js/66.ab5a4b68.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/99.07307f5a.chunk.js": "./static/js/99.07307f5a.chunk.js",
 | 
			
		||||
  "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.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
 | 
			
		||||
  "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/'
 | 
			
		||||
            }
 | 
			
		||||
            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>!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