自动加载
This commit is contained in:
parent
cd69149d3a
commit
058b1e9d69
|
@ -1,32 +1,32 @@
|
|||
#coding=utf-8
|
||||
|
||||
module Mobile
|
||||
require_relative 'middleware/error_handler'
|
||||
require_relative 'apis/auth'
|
||||
require_relative 'apis/users'
|
||||
require_relative 'apis/courses'
|
||||
require_relative 'apis/watches'
|
||||
require_relative 'apis/upgrade'
|
||||
require_relative 'apis/homeworks'
|
||||
require_relative 'apis/comments'
|
||||
require_relative 'apis/issues'
|
||||
require_relative 'apis/activities'
|
||||
require_relative 'apis/whomeworks'
|
||||
require_relative 'apis/newss'
|
||||
require_relative 'apis/journal_for_messages'
|
||||
require_relative 'apis/messages'
|
||||
require_relative 'apis/blog_comments'
|
||||
require_relative 'apis/new_comment'
|
||||
require_relative 'apis/praise'
|
||||
require_relative 'apis/resources'
|
||||
require_relative 'apis/syllabuses'
|
||||
# require_relative 'middleware/error_handler'
|
||||
# require_relative 'apis/auth'
|
||||
# require_relative 'apis/users'
|
||||
# require_relative 'apis/courses'
|
||||
# require_relative 'apis/watches'
|
||||
# require_relative 'apis/upgrade'
|
||||
# require_relative 'apis/homeworks'
|
||||
# require_relative 'apis/comments'
|
||||
# require_relative 'apis/issues'
|
||||
# require_relative 'apis/activities'
|
||||
# require_relative 'apis/whomeworks'
|
||||
# require_relative 'apis/newss'
|
||||
# require_relative 'apis/journal_for_messages'
|
||||
# require_relative 'apis/messages'
|
||||
# require_relative 'apis/blog_comments'
|
||||
# require_relative 'apis/new_comment'
|
||||
# require_relative 'apis/praise'
|
||||
# require_relative 'apis/resources'
|
||||
# require_relative 'apis/syllabuses'
|
||||
|
||||
class API < Grape::API
|
||||
version 'v1', using: :path
|
||||
format :json
|
||||
content_type :json, "application/json;charset=UTF-8"
|
||||
use ActionDispatch::Session::CookieStore
|
||||
use Mobile::Middleware::ErrorHandler
|
||||
use Middleware::ErrorHandler
|
||||
|
||||
helpers do
|
||||
def logger
|
||||
|
|
Loading…
Reference in New Issue