/home/pano/Programming/0_repos/TriliumNextNotes/src/services/encryption/recovery_codes.ts
2:1 error Imports should be sorted alphabetically sort-imports
3:1 error Imports should be sorted alphabetically sort-imports
13:9 error 'encryptedRecoveryCodes' is never reassigned. Use 'const' instead prefer-const
57:5 error Unexpected var, use let or const instead no-var
the updateOption function that handles the req.param is just destructuring `const { name, value } = req.params;` and does nothing else with the path or any params.
The remaining parts of the wildcard (which can be accessed via req.param[0]) are just ignored here.
even with express v4, this would *always* just take and process the very first part of the path, in the exact wildcard's place, e.g.
`/api/options/locale/de` and
`/api/options/locale/de/test/whatever`
would *both* end up destructuring "value" from req.param as "de" (because it is in the exact place of the 'value' wildcard)
in express v5 the wildcard behaviour changes -> here req.param.value would return an array with the paths split into separate string.
but since the code previously regarded only the first part of the path -> we can just get rid of the wildcard and use a named route param
the only thing to keep in mind: if a request with more than one "value" is received, (e.g. `/api/options/locale/de/test/whatever`) -> since we don't have the wildcard anymore -> this will turn to a 404.
IMHO that is actually desirable here though
our code is already compliant with v5, and is not affected by the breaking changes described here:
https://expressjs.com/en/guide/migrating-5.html
I ran their codemod command, and it did not find anything – so I also double-checked by manually checking for all of the described changed topics in the migration guide.
with this change npm will still print a warning, due to
`@triliumnext/express-partial-content@"1.0.1"`, which needs to be updated to v5 as well