diff --git a/shard.lock b/shard.lock index 8afd0831..d56fc1fe 100644 --- a/shard.lock +++ b/shard.lock @@ -31,7 +31,7 @@ shards: bindata: git: https://github.com/spider-gazelle/bindata.git - version: 1.9.1 + version: 1.10.0 clear: git: https://github.com/place-labs/clear.git @@ -47,7 +47,7 @@ shards: email: git: https://github.com/arcage/crystal-email.git - version: 0.6.3 + version: 0.6.4 faker: git: https://github.com/askn/faker.git @@ -91,12 +91,20 @@ shards: neuroplastic: git: https://github.com/spider-gazelle/neuroplastic.git - version: 1.10.0 + version: 1.11.0 office365: git: https://github.com/placeos/office365.git version: 1.14.0 + open_api: + git: https://github.com/elbywan/open_api.cr.git + version: 1.3.0 + + openapi-generator: + git: https://github.com/place-labs/openapi-generator.git + version: 2.1.0+git.commit.a65ffc2f7dcc6a393e7d1f9229650b520d9525be + openssl_ext: git: https://github.com/spider-gazelle/openssl_ext.git version: 2.1.5 @@ -119,7 +127,7 @@ shards: placeos-models: git: https://github.com/placeos/models.git - version: 6.2.0 + version: 6.3.0 promise: git: https://github.com/spider-gazelle/promise.git diff --git a/src/controllers/application.cr b/src/controllers/application.cr index 59843af7..e50ab1d4 100644 --- a/src/controllers/application.cr +++ b/src/controllers/application.cr @@ -10,9 +10,7 @@ abstract class Application < ActionController::Base # HELPERS # ========================================= include Utils::PlaceOSHelpers - # include Utils::GoogleHelpers include Utils::CurrentUser - # include Utils::Responders include Utils::MultiTenant # ========================================= diff --git a/src/controllers/utilities/responders.cr b/src/controllers/utilities/responders.cr deleted file mode 100644 index 87b09dbb..00000000 --- a/src/controllers/utilities/responders.cr +++ /dev/null @@ -1,26 +0,0 @@ -require "http" - -module Utils::Responders - # Merge fields into object - def with_fields(model, fields) : Hash - # Double serialisation - attrs = Hash(String, JSON::Any).from_json(model.to_json) - attrs.merge(fields) - end - - # Restrict model attributes - def restrict_attributes( - model, - only : Array(String)? = nil, # Attributes to keep - except : Array(String)? = nil, # Attributes to exclude - fields : Hash? = nil # Additional fields - ) : Hash - # Necessary for fields with converters defined - # Double serialisation - attrs = Hash(String, JSON::Any).from_json(model.to_json) - attrs.select!(only) if only - attrs.reject!(except) if except - - fields && !fields.empty? ? attrs.merge(fields) : attrs - end -end