/dmails: don't default to 'received' folder.

Don't make /dmails default to the received folder when no other folder
is specified. This is surprising in the API because it means
/dmails.json only shows received dmails by default, not all dmails. This
isn't necessary either since everything that links to dmails already
specifies the received folder.
This commit is contained in:
evazion
2020-02-16 03:36:10 -06:00
parent 8024d9f0ba
commit b591353773

View File

@@ -15,7 +15,7 @@ class DmailsController < ApplicationController
end
def index
@dmails = Dmail.visible.paginated_search(params, defaults: { folder: "received" }, count_pages: true)
@dmails = Dmail.visible.paginated_search(params, count_pages: true)
@dmails = @dmails.includes(:owner, :to, :from) if request.format.html?
respond_with(@dmails)