[openstreetmap/openstreetmap-website] Add Messages API (PR #4605)
Anton Khorev
notifications at github.com
Thu Mar 21 12:19:19 UTC 2024
@AntonKhorev commented on this pull request.
> + format.json { render :action => :show }
+ end
+ end
+
+ private
+
+ def show_messages
+ if params[:min_id]
+ @messages = @messages.where("id >= ?", params[:min_id]) unless params[:min_id] == "0"
+ @messages = @messages.order(:id => :asc)
+ else
+ @messages = @messages.where("id <= ?", params[:max_id]) unless params[:max_id].nil? || params[:max_id] == "0"
+ @messages = @messages.order(:id => :desc)
+ end
+
+ limit = params[:count]
This parameter is called `limit` everywhere else.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4605#pullrequestreview-1952046178
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4605/review/1952046178 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240321/8316bf39/attachment.htm>
More information about the rails-dev
mailing list