[openstreetmap/openstreetmap-website] Add Messages API (PR #4605)
Milan Cvetkovic
notifications at github.com
Fri Mar 22 11:15:38 UTC 2024
@milan-cvetkovic commented on this pull request.
> + raise OSM::APIAccessDenied
+ end
+
+ @message.save!
+
+ # Return a copy of the message
+ respond_to do |format|
+ format.xml { render :action => :show }
+ format.json { render :action => :show }
+ end
+ end
+
+ private
+
+ def show_messages
+ if params[:min_id]
Using timestamp in this case would require us to add an additional index. There is also an edge case of multiple messages with same timestamp, potentially resulting in result set longer than "limit".
I wonder if it is possible for the list to be mis-ordered by timestamp, when it is ordered by `id`? I guess it depends on how autoincrement is implemented.
I am not sure if adding an index is worth it...
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4605#discussion_r1535420316
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4605/review/1954544184 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240322/0fe1c05e/attachment-0001.htm>
More information about the rails-dev
mailing list