Skip to content

Conversation

@ac000
Copy link
Owner

@ac000 ac000 commented Apr 27, 2025

Most of the API endpoints have the same .authz and .scope values.

Extend and rename the api_version_map[] array to now be a set of default values for an endpoint API. Move it into api_endpoints.h where it's better suited and we can then create a couple of inline helper functions for getting the right .authz and .scope values.

We check the endpoints array first for the .authz and .scope values, if they aren't set we grab one or both values from this new array.

This allows to remove most of the .authz and .scope initialisers from endpoints[]. We leave the OAuth entries as they are slightly different.

Most of the API endpoints have the same .authz and .scope values.

Extend and rename the api_version_map[] array to now be a set of default
values for an endpoint API. Move it into api_endpoints.h where it's
better suited and we can then create a couple of inline helper functions
for getting the right .authz and .scope values.

We check the endpoints array first for the .authz and .scope values, if
they aren't set we grab one or both values from this new array.

This allows to remove most of the .authz and .scope initialisers from
endpoints[]. We leave the OAuth entries as they are slightly different.

Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
@ac000 ac000 merged commit 1c7391b into master Apr 27, 2025
8 checks passed
@ac000 ac000 deleted the ep branch April 27, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant