Conflicts: app/views/admin/excellent_all_courses.html.erbdai_ao
commit
cb11cac506
@ -0,0 +1 @@
|
||||
{"access_token":"oEEf8ZKAB8Y2G0o_xnTPkPJHKKk8iHkLC-f5ptvQ2nCMj9IpC86ivLD2-p38GfOkuG-HuQp3pWZqhs3NJXUMdPLWsr5k67hPZYuqg4ozLccx0xdLswapj0mn8ovZhK1tKIKiAFAOMO","expires_in":7200,"got_token_at":1467012449}
|
@ -0,0 +1,55 @@
|
||||
#coding=utf-8
|
||||
module Mobile
|
||||
module Apis
|
||||
class Resources < Grape::API
|
||||
|
||||
resource :resources do
|
||||
|
||||
desc '获取所有课件'
|
||||
params do
|
||||
requires :token, type: String
|
||||
end
|
||||
get do
|
||||
authenticate!
|
||||
data = current_user.course_attachments
|
||||
present :data, data, with: Mobile::Entities::Attachment
|
||||
present :status, 0
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
desc '获取所有作业'
|
||||
params do
|
||||
requires :token, type: String
|
||||
end
|
||||
get 'homeworks' do
|
||||
authenticate!
|
||||
|
||||
homeworks = current_user.homework_commons
|
||||
|
||||
present :data, homeworks, with: Mobile::Entities::Homework
|
||||
present :status, 0
|
||||
|
||||
end
|
||||
|
||||
desc '获取所有测验'
|
||||
params do
|
||||
requires :token, type: String
|
||||
end
|
||||
get 'exercies' do
|
||||
authenticate!
|
||||
|
||||
exercises = current_user.exercises
|
||||
present :data, exercises, with: Mobile::Entities::Exercise
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
module Mobile
|
||||
module Entities
|
||||
class Exercise < Grape::Entity
|
||||
expose :exercise_name
|
||||
expose :exercise_description
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the QualityAnalyses controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the syllabuses controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue