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 App.Es.EsQueryDsl do | |
| defstruct query: [], _source: %{include: ["id"]} | |
| def get_param(map, key) do | |
| val = Map.get(map, key) | |
| val = if val != "", do: val, else: nil | |
| if is_list(val) && length(val) == 0, do: nil, else: val | |
| end |
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 App.EsDocument.EsAdvAccount do | |
| @behaviour App.Es.DocumentBehavior | |
| alias App.Repo | |
| alias App.AdvAccount | |
| alias App.Es.EsQuery | |
| alias App.Es.EsDocument | |
| use EsDocument |
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 App.EsDocument.EsAdvAccount do | |
| @behaviour App.Es.DocumentBehavior | |
| alias App.Repo | |
| alias App.AdvAccount | |
| alias App.Es.EsQuery | |
| alias App.Es.EsDocument | |
| use EsDocument |
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 App.Es.EsDocument do | |
| alias App.Es.EsClient | |
| alias App.Es.EsQuery | |
| defmacro __using__(_) do | |
| quote do | |
| @doc """ | |
| Re-create index for document - delete and create with specified mapping | |
| """ |
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 Mix.Tasks.App.SyncEs do | |
| use Mix.Task | |
| import App.Cli.Task | |
| import Ecto.Query, only: [from: 1, from: 2, limit: 2, offset: 2] | |
| alias App.Repo | |
| alias App.AdvAccount | |
| alias App.HashTag | |
| alias App.EsSearch |
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
| test "get one user", %{conn: conn} do | |
| query = " | |
| { | |
| users { | |
| id | |
| } | |
| } | |
| " | |
| opts = Absinthe.Plug.GraphiQL.init(schema: Tendsup.GraphQl.Schema) | |
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
| $(settings.dropZoneId).on('click', function () { | |
| $("#file_upload").trigger("click"); | |
| return false; | |
| }); | |
| // so far limit extension only for images | |
| var extensionsByTypes = extensionsByTypes[appConstants.DOCUMENT.TYPE_IMAGE]; | |
| var allAllowedExtensions = extensionsByTypes; | |
| //$.each(extensionsByTypes, function (key, value) { |
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
| <?php | |
| namespace vendori\helpers; | |
| use Yii; | |
| use CJSON; | |
| class S3DirectUpload | |
| { |
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 Rsed.EventDispatcher do | |
| use GenServer | |
| def start_link() do | |
| GenServer.start_link(__MODULE__, :ok, name: my_name()) | |
| end | |
| def init(:ok) do | |
| {:ok, %{}} | |
| end |
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 Rsed.Test.EventDispatcher do | |
| use ExUnit.Case, async: true | |
| alias Rsed.EventDispatcher | |
| setup do | |
| dispatcher = start_supervised!(EventDispatcher) | |
| %{dispatcher: dispatcher} | |
| end |