Sha256: 61e71d81acc35a49703723b9fda01eea92d4a35bc58c96d7dc05d3356a902d39

Contents?: true

Size: 832 Bytes

Versions: 5

Compression:

Stored size: 832 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 :read, on: :collection, via: [:put, :patch]
    match :unread, on: :collection, via: [:put, :patch]
    match :move, on: :collection, via: [:put, :patch]

    resources :labels, only: [:create, :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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
postman_mta-0.1.7 config/routes.rb
postman_mta-0.1.6 config/routes.rb
postman_mta-0.1.5 config/routes.rb
postman_mta-0.1.4 config/routes.rb
postman_mta-0.1.3 config/routes.rb