diff --git a/.formatter.exs b/.formatter.exs index 8ab686a1..25eec150 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -3,7 +3,7 @@ inputs: [ "*.{ex,exs}", "{config,lib,test,priv}/**/*.{ex,exs}", - "apps/*/{config,lib,test,priv}/**/*.{ex,exs}" + "{apps,libs}/*/{config,lib,test,priv}/**/*.{ex,exs}" ], line_length: 120 ] diff --git a/libs/application_runner/lib/controllers/docs_controller.ex b/libs/application_runner/lib/controllers/docs_controller.ex index 51c7b1ec..9b37a651 100644 --- a/libs/application_runner/lib/controllers/docs_controller.ex +++ b/libs/application_runner/lib/controllers/docs_controller.ex @@ -213,9 +213,7 @@ defmodule ApplicationRunner.DocsController do doc_id, transaction_id ]) do - Logger.debug( - "#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok" - ) + Logger.debug("#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok") reply(conn) end @@ -230,9 +228,7 @@ defmodule ApplicationRunner.DocsController do ) do with :ok <- MongoInstance.run_mongo_task(env.id, MongoStorage, :delete_doc, [env.id, coll, doc_id]) do - Logger.debug( - "#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok" - ) + Logger.debug("#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok") reply(conn) end @@ -278,7 +274,15 @@ defmodule ApplicationRunner.DocsController do end end - def find(conn, %{"coll" => coll}, filter, %{environment: env}, replace_params) do + def find( + conn, + %{"coll" => coll}, + %{ + "query" => query + }, + %{environment: env}, + replace_params + ) do Logger.warning( "This form of query is deprecated, prefer using: {query: , projection: {projection}}, more info at: https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#mongodb-method-db.collection.find" ) @@ -287,7 +291,7 @@ defmodule ApplicationRunner.DocsController do MongoInstance.run_mongo_task(env.id, MongoStorage, :filter_docs, [ env.id, coll, - Parser.replace_params(filter, replace_params) + Parser.replace_params(query, replace_params) ]) do Logger.debug( "#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with res #{inspect(docs)}" @@ -370,9 +374,7 @@ defmodule ApplicationRunner.DocsController do transaction_id, env.id ]) do - Logger.debug( - "#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok" - ) + Logger.debug("#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok") reply(conn) end @@ -390,9 +392,7 @@ defmodule ApplicationRunner.DocsController do transaction_id, env.id ]) do - Logger.debug( - "#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok" - ) + Logger.debug("#{__MODULE__} respond to #{inspect(conn.method)} on #{inspect(conn.request_path)} with status :ok") reply(conn) end