[openstreetmap/openstreetmap-website] Add user block api call (PR #4301)
Tom Hughes
notifications at github.com
Sat Oct 21 09:36:01 UTC 2023
@tomhughes commented on this pull request.
> @@ -14,5 +16,30 @@ def show
rescue ActiveRecord::RecordNotFound
raise OSM::APINotFoundError
end
+
+ def create
+ raise OSM::APIBadUserInput, "No user was given" unless params[:user]
+
+ user = User.visible.find_by(:id => params[:user])
+ raise OSM::APINotFoundError unless user
+ raise OSM::APIBadUserInput, "No reason was given" unless params[:reason]
Neither of these comments has much to do with this PR which just introduces a new way of creating a block - both of those comments apply to the existing web interface as much as they do to an API call.
As far as format goes only markdown is supported for new data - the other formats are all legacy formats though I suspect they predate blocks in any case so all blocks are probably markdown.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4301#discussion_r1367697222
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4301/review/1691222047 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231021/a110b3c4/attachment.htm>
More information about the rails-dev
mailing list