30 lines
436 B
Ruby
30 lines
436 B
Ruby
#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
|