Merge branch 'api' of http://repository.trustie.net/xianbo/trustie2 into api
This commit is contained in:
commit
58c31b1d7f
|
@ -69,7 +69,7 @@ module Mobile
|
|||
requires :time, type: String, desc: '年份'
|
||||
requires :class_period, type: String, desc: '学时总数'
|
||||
end
|
||||
post do
|
||||
put do
|
||||
authenticate!
|
||||
cs = CoursesService.new
|
||||
cs_params = {
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#coding=utf-8
|
||||
|
||||
module Mobile
|
||||
module Apis
|
||||
class Homeworks < Grape::API
|
||||
|
||||
def self.get_servcie
|
||||
new HomeworkService
|
||||
end
|
||||
|
||||
resources :homeworks do
|
||||
|
||||
desc "作业详情"
|
||||
params do
|
||||
requires :id, type: Integer, desc: "作业ID"
|
||||
end
|
||||
route_param :id do
|
||||
get do
|
||||
get_service.show_homework params
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue