Sha256: 2695ad8d9c096e5b7f19e5261f2273e79f00b7faba8332af2e5aa1f3a2d5eba3
Contents?: true
Size: 1.08 KB
Versions: 7
Compression:
Stored size: 1.08 KB
Contents
require 'grape' require 'snowman-io/api/extra/meteor' require 'snowman-io/api/auth_helpers' require 'snowman-io/api/users' require 'snowman-io/api/apps' require 'snowman-io/api/info' require 'snowman-io/api/metrics' require 'snowman-io/api/checks' require 'snowman-io/api/agent' require 'snowman-io/api/fridge' require 'snowman-io/api/invites' require 'snowman-io/api/profile' require 'snowman-io/api/friendship' module SnowmanIO module API class Root < Grape::API include AuthHelpers default_format :json format :json default_error_formatter :json rescue_from Mongoid::Errors::Validations do |e| response = {errors: e.document.errors} rack_response response.to_json, 400 end helpers do def permitted_params @permitted_params ||= declared(params, include_missing: false) end end mount Agent prefix :api mount Users mount Invites mount Profile mount Friendship mount Apps mount Info mount Metrics mount Checks mount Fridge end end end
Version data entries
7 entries across 7 versions & 1 rubygems