Sha256: a5de77f97a44a3e10911642267aa88f6f9004125a7c30c141492615ebc633b2e

Contents?: true

Size: 956 Bytes

Versions: 1

Compression:

Stored size: 956 Bytes

Contents

PostmanMta::Engine.routes.draw do
  resources :messages, only: [:show, :create], param: :token do
    resources :attachments, only: :show, param: :uuid
  end

  resources :conversations, only: [:index, :show, :destroy] do
    [:inbox, :sent, :spam, :trash].each do |folder|
      match folder, on: :collection, via: :get
    end

    match :starred, on: :collection, via: :get, to: 'conversations#index'
    match :search, on: :collection, via: :get
    match :read, on: :collection, via: [:put, :patch]
    match :unread, on: :collection, via: [:put, :patch]
    match :move, on: :collection, via: [:put, :patch]

    resources :labels, only: [:create, :update, :destroy]
    resources :tags, only: [:create, :destroy]
  end

  namespace :stats do
    resources :messages, only: [] do
      match :unread, on: :collection, via: :get
    end
  end

  resources :routes, only: :index
  resources :domains, only: :index
  resources :labels, only: :index
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
postman_mta-0.2.1 config/routes.rb