This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule YourAppWeb.GraphiQLController do | |
| use YourAppWeb, :controller | |
| def graphiql(conn, _params) do | |
| graphiql = | |
| Path.join([:code.priv_dir(:your_app_here), "graphiql", "graphiql.html"]) | |
| conn | |
| |> put_resp_header("content-type", "text/html; charset=utf-8") | |
| |> Plug.Conn.send_file(200, graphiql) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\code\jdk-11\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\code\safari\api-ktor3 "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\lib\idea_rt.jar=60024:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.2 install | |
| [INFO] Scanning for projects... | |
| [INFO] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| start transaction; | |
| insert into tenants (name) values ('test') returning id; -- id = 1 | |
| insert into sub_tenants (tenant_id, name) values (1, 'test'); | |
| commit; | |
| -- 'Key (tenant_id)=(1) is not present in table "tenants". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ႋ窝ᬀ退Request: POST /api/v2/graphql | |
| ** (exit) an exception was raised: | |
| ** (KeyError) key :parent_name not found | |
| (ecto) lib/ecto/repo/queryable.ex:249: anonymous fn/2 in Ecto.Repo.Queryable.process/4 | |
| (stdlib) maps.erl:257: :maps.fold_1/3 | |
| (ecto) lib/ecto/repo/queryable.ex:249: Ecto.Repo.Queryable.process/4 | |
| (ecto) lib/ecto/repo/queryable.ex:219: anonymous fn/3 in Ecto.Repo.Queryable.postprocessor/4 | |
| (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2 | |
| (ecto) lib/ecto/repo/queryable.ex:153: Ecto.Repo.Queryable.execute/4 | |
| (ecto) lib/ecto/repo/queryable.ex:18: Ecto.Repo.Queryable.all/3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def join("room:" <> room_id, _params, socket) do | |
| #this prints | |
| IO.inspect(room_id) | |
| case RoomCtx.find(room_id) do | |
| nil -> | |
| #does not print | |
| IO.inspect("not found") | |
| Logger.debug("[channel:room] attempted to join nonexistent room #{room_id}") | |
| {:error, :not_found} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defp do_send_file(conn, file, opts \\ []) do | |
| path = Path.join(filestorage_path(), file.file_path_hash) | |
| Logger.debug "Streaming file #{path}" | |
| if File.exists?(path) do | |
| conn = case Keyword.has_key?(opts, :attachment) do | |
| true -> put_resp_header(conn, "content-disposition", "attachment; filename=\"#{file.original_file_name}\"") | |
| false -> put_resp_header(conn, "content-disposition", "filename=\"#{file.original_file_name}\"") | |
| end | |
| put_resp_header(conn, "content-type", file.content_type) | |
| |> send_file(200, path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET MIX_ENV=fixtures | |
| mix ecto.drop | |
| mix ecto.create | |
| psql -U postgres -c "CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public" sow_test | |
| mix ecto.migrate | |
| mix sow.db.fixtures | |
| SET MIX_ENV= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script/ci/build_release.sh | |
| * creating /home/ubuntu/.mix/archives/hex-0.16.0.ez | |
| * creating /home/ubuntu/.mix/rebar | |
| * creating /home/ubuntu/.mix/rebar3 | |
| Running dependency resolution... | |
| ** (Version.InvalidRequirementError) 1.6.3 or 1.6.5 or 1.7.1 | |
| (hex) lib/hex/version.ex:89: Hex.Version.parse_requirement!/2 | |
| (hex) lib/hex/version.ex:23: anonymous fn/3 in Hex.Version.match?/3 | |
| (hex) lib/hex/version.ex:98: Hex.Version.cache/2 | |
| (elixir) lib/enum.ex:738: anonymous fn/3 in Enum.filter/2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| conn | |
| |> put_status(401) | |
| |> json(%{ "error" => "Token invalid", "invalid" => true }) | |
| halt(conn) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [error] 05:59:13.770 Error in process #PID<0.22274.1> on node :"[email protected]" with exit value: | |
| {:function_clause, | |
| [{:cowboy_protocol, :parse_method, | |
| ["", | |
| {:state, #Port<0.52289>, :ranch_tcp, [:cowboy_router, :cowboy_handler], | |
| false, | |
| [listener: Core.Endpoint.HTTP, | |
| dispatch: [{:_, [], | |
| [{["ws", "v1", "client", "websocket"], [], | |
| Phoenix.Endpoint.CowboyWebSocket, |
NewerOlder