You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/api/mobile/apis/homeworks.rb

31 lines
464 B

#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
hs = HomeworkService.new
hs.show_homework params
end
end
end
end
end
end