Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: allow for unversioned api links #1374

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Feb 20, 2024

Implements LIBS-405


Key features

1.Note this PR is a modification to app-runtime required by login_app. The main implementation of the ticket is in app-platform: dhis2/app-platform#831

The public endpoints (e.g. api/loginConfig) do not support including version (so api/41/loginConfig is not public). Hence, this PR updates to get a skipApiVersion passed to the Provider by app-adapter to indicate that the app should not use versions in its requests.


Checklist

  • Have written Documentation
    • This is only an internal change for now
  • Has tests coverage

@@ -22,3 +22,7 @@ export interface Config {
serverVersion?: Version
systemInfo?: SystemInfo
}

export interface ConfigWithSkipApiVersion extends Config {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra props provided to provider are actually already being passed downwards (https://github.com/dhis2/app-runtime/blob/master/services/data/src/react/components/DataProvider.tsx#L36-L39)

but the type definition used (e.g. https://github.com/dhis2/app-runtime/pull/1374/files#diff-accda02931529da3af34ae8dbe9c0ea5549c444fdbcaf5a7d504a086dfd9331eR76) caused problems, so I'm extending it.

I'm not sure what the logic was of originally passing the props as part of the config, so I haven't updated things any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant