Commit graph

60 commits

Author SHA1 Message Date
Tom Hughes
9adad9f90d Fix new rubocop warnings 2022-06-14 19:04:39 +01:00
mmd-osm
4ec85171fd JSON output added to changeset(s) endpoints 2022-03-14 15:52:49 +01:00
mmd-osm
c9e836a6cb JSON output added to permissions endpoint 2022-03-08 20:21:35 +01:00
Tom Hughes
cbcc7dc49f Fix some rubocop Naming/PredicateName warnings 2022-03-03 22:47:55 +00:00
mmd-osm
2efd73c672 Introduce relation member limit
Adds a new parameter `max_number_of_relation_members` in settings.yml
2022-02-02 13:15:40 +01:00
Tom Hughes
6403515897 Replace to_s on TimeWithZone objects with to_formatted_s 2022-01-10 18:59:22 +00:00
Tom Hughes
fea1b5b88d Fix new rubocop warnings 2021-12-28 19:47:51 +00:00
Andy Allan
40e8482825 Alias the user creation_time column
This allows rails to set the created_at automatically, and so avoids
us from having to do so in a callback. It also hides the unusual
db column name from the rest of the app.
2021-12-22 14:48:07 +00:00
Tom Hughes
5966acc207 Merge remote-tracking branch 'upstream/pull/3300' 2021-10-07 17:45:07 +01:00
Andy Allan
95e5178bfb Refactor tracepoint index to use an xml builder view
This avoids constructing xml by hand in both the controller and
the model, and opens the way for other rendering in future.

The complexity of deciding which point goes where, along with revisiting
previous tracks and tracksegs means that I've broken it down into
two parts - sorting the points into the right trksegs is done first,
before rendering them all as xml. I couldn't find a way to allow
revisiting using the builder.
2021-09-29 15:14:53 +01:00
Andy Allan
76f1d7bc78 Use a builder to render changeset downloads 2021-09-15 16:33:04 +01:00
Tom Hughes
f4d1d97848 Add a privileged scope that allows email addresses to be returned 2021-08-26 17:22:25 +01:00
Tom Hughes
cc461b126d Correct policing of access to private user details 2021-08-24 17:49:08 +01:00
Andy Allan
28af501924 Merge branch 'pull/3164' 2021-04-14 16:13:29 +01:00
Michal Migurski
143a90fcac Added root elements and dict support for preferences response 2021-04-07 17:45:24 -07:00
Andy Allan
6f2e3e9508 Add missing root attributes to User#show and User#index json responses 2021-04-07 16:30:08 +01:00
Michal Migurski
fd7526857b Updated JSON response format per feedback 2021-04-06 21:44:38 -07:00
Michal Migurski
a67ff9c038 Added JSON support to user preferences 2021-04-06 21:27:54 -07:00
mmd-osm
37a7996d94 API User details: format tweaks
- _show_ to return single user only
- remove nesting for languages
2020-09-18 21:50:38 +02:00
mmd-osm
0fb725ea61 API User details JSON format 2020-09-06 22:11:23 +02:00
Tom Hughes
2d3972249c Fix some rubocop todos 2020-08-02 19:38:58 +01:00
mmd-osm
7fcb76aa9a JSON: move root_attributes to shared folder 2020-01-22 22:47:47 +01:00
mmd-osm
b54333fa6d Unify lat/lon formatting for json output 2020-01-02 14:52:53 +01:00
mmd-osm
75a49786f8 API JSON output 2019-12-30 16:37:52 +01:00
Tom Hughes
81fb26d840 Merge remote-tracking branch 'upstream/pull/2434' 2019-11-20 19:17:29 +00:00
Tom Hughes
b5d4c262dd Switch to using jbuilder for JSON templates 2019-11-20 18:54:04 +00:00
Andy Allan
8ad88b9ddc Move user preference XML generation to a view 2019-11-20 16:39:23 +01:00
Tom Hughes
91a37235ac Remove support for old style user images 2019-07-16 22:33:26 +01:00
Tom Hughes
6c202448ad Move user images to Active Storage with paperclip as a fallback 2019-07-09 19:17:30 +01:00
mmd
11cc4a5e60
Merge branch 'master' into patch/view_migration 2019-06-27 22:40:51 +02:00
mmd-osm
cf3cf5216f Avoid unnecessary arrays 2019-06-27 18:33:12 +02:00
mmd-osm
d0de9967b9 Simplify partial rendering 2019-06-26 22:29:18 +02:00
mmd-osm
45e7c9a32e Avoid using @variables in partials 2019-06-26 21:34:40 +02:00
Tom Hughes
a66c34991a Merge remote-tracking branch 'upstream/pull/2280' 2019-06-26 19:57:12 +01:00
Andy Allan
2398614349 Add support for an unversioned 'versions' API call
This will eventually replace the unversioned 'capabilities' call.
Client applications can use this versions call to find out what versions
are available, if they support multiple versions. The capabilities
of each version, and the format of the capabilities call, is then
able to change between versions. If a client only supports one version
they can jump straight to the versioned capabilities call.

Additionally, supported versions are now a list of version identifiers,
without any implications surrounding min/max values (e.g. guesswork
for supported intermediate versions).

Fixes #2162
2019-06-26 16:52:10 +02:00
Tom Hughes
cbea796ef4 Merge remote-tracking branch 'upstream/pull/2207' 2019-06-26 14:30:30 +01:00
Tom Hughes
f280dcb2d7 Merge remote-tracking branch 'upstream/pull/2278' 2019-06-26 13:36:44 +01:00
Andy Allan
0211141c08 Simplify render calls for changesets 2019-06-26 14:25:34 +02:00
Andy Allan
3914050fcc Simplify partial rendering when the partial is named after the model 2019-06-26 14:13:09 +02:00
Andy Allan
c24b0e9399 Rework to ensure views are named after the controller method name 2019-06-26 13:45:40 +02:00
Andy Allan
23dfc4d3bd Update note comments to use friendly_date_ago helper
Refs #2255
2019-06-19 18:04:08 +02:00
mmd-osm
363155a2a8 Move xml gen. into view for (old) nodes, ways, relations, map 2019-05-07 22:16:22 +02:00
Frederik Ramm
17e6e69c39 Move generation of gpx_file XML from model to builder 2019-04-14 16:25:14 +01:00
Andy Allan
e66c719294 Resourceful(ish) naming for api/users_controller 2019-04-10 17:06:15 +02:00
Tom Hughes
79bda7a8ed Format closed_at correctly in changeset API responses
Fixes #2195
2019-03-30 15:40:08 +00:00
Tom Hughes
e3ed9988ce Merge remote-tracking branch 'upstream/pull/2177' 2019-03-16 15:39:03 +00:00
Andy Allan
d98683abfb Rubocop fix 2019-03-16 15:30:41 +00:00
Andy Allan
656ed0af76 Move changeset builder views to the api namespace 2019-03-16 15:30:41 +00:00
Andy Allan
d102c9aaf4 Move all settings to settings.yml
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
b4dbf6233c Move the notes api methods into a controller in the api namespace 2019-02-28 17:12:28 +01:00