Maikel Linke
0d8df5d2a8
Replace Bugsnag calls with Alert.raise
2024-11-21 15:58:55 +11:00
Neal Chambers
a263110799
Safely autocorrect Rails/DotSeparatedKeys
...
Inspecting 1481 files
........................................................................C................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
app/controllers/api/v1/base_controller.rb:72:66: C: [Corrected] Rails/DotSeparatedKeys: Use the dot-separated keys instead of specifying the :scope option.
message = I18n.t(:missing_parameter, param: error.param, scope: :api)
^^^^^^^^^^^
app/controllers/api/v1/base_controller.rb:79:84: C: [Corrected] Rails/DotSeparatedKeys: Use the dot-separated keys instead of specifying the :scope option.
message = I18n.t(:unpermitted_parameters, params: error.params.join(", "), scope: :api)
^^^^^^^^^^^
1481 files inspected, 2 offenses detected, 2 offenses corrected
2023-08-01 22:50:21 +09:00
Mikael Norlén
22b1dd3232
Add support for extra_fields query parameter
...
Api now supports optional fields.
These are included with the extra_fields query param.
Syntax: extra_fields[type]=field1,field2
2023-02-15 11:14:27 +01:00
Maikel Linke
52e934ec2b
Consistently use our FeatureToggle module
...
Direct calls to Flipper have the downside that we can't add any new
functionality like storing the feature in the database when used.
2022-10-08 16:23:17 +02:00
Maikel Linke
ba1e21ad75
Feature-toggle API also per API key
...
We looked only at logged in users (session cookie) before.
2022-04-15 12:34:57 +10:00
Maikel Linke
aa6e5ae799
Report useful error message in missing parameter
2022-03-28 10:55:57 +11:00
Maikel Linke
41746459fa
Restrict allow_charges attribute to read-only
...
We want people to use the UI to change this attribute.
2022-03-28 10:55:57 +11:00
Maikel Linke
12d989568e
Safer API error reporting
...
We don't know what unknown errors would report. They could expose
sensitive data. So let's not pass that data on to the public while we
have the full details in Bugsnag.
Also, let's not catch Exception because that could catch interrupts to
gracefully shut down the application.
2022-03-02 11:59:35 +11:00
Maikel Linke
4aa70c1ffd
Render pagination errors
2022-03-02 11:59:35 +11:00
Matt-Yorkley
3dbf00f302
Add pagination with Pagy using structure from JSON:API specification
...
https://jsonapi.org/examples/#pagination
Update schema for collections rendered with pagination data
2022-03-02 11:58:04 +11:00
Matt-Yorkley
c102ce8e7e
Add RequestTimeout concern
2022-03-02 11:58:04 +11:00
Matt-Yorkley
a222b507fb
Update and document authentication methods
2022-03-02 11:58:04 +11:00
Matt-Yorkley
c4e2c8cb4c
Tidy up error handling and update response formats for JSON:API standard
...
Update translation key namespacing
2022-03-02 11:55:46 +11:00
Matt-Yorkley
7d8ded5ab8
Bring simplified / cleaned up base controller into V1
...
- Inherits from ActionController::API
- Lots of superfluous junk removed
2022-03-02 11:55:46 +11:00