2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Update plugin metadata endpoint (#251)

* Update plugin metadata endpoint

* Update release notes
This commit is contained in:
Oliver 2023-01-27 23:47:48 +11:00 committed by GitHub
parent e9d9cf5322
commit 9791fb7d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -4,6 +4,7 @@
### 0.10.0 - February 2023 ### 0.10.0 - February 2023
--- ---
- Updates to match latest server API
- Bug fix for empty HttpResponse from server - Bug fix for empty HttpResponse from server
### 0.9.2 - December 2022 ### 0.9.2 - December 2022

View File

@ -679,7 +679,19 @@ class InvenTreePlugin extends InvenTreeModel {
} }
@override @override
String get URL => "plugin/"; String get URL {
/* Note: The plugin API endpoint changed at API version 90,
* < 90 = 'plugin'
* >= 90 = 'plugins'
* Ref: https://github.com/inventree/InvenTree/pull/4186
*/
if (api.isConnected() && api.apiVersion < 90) {
return "plugin/";
} else {
return "plugins/";
}
}
String get key => (jsondata["key"] ?? "") as String; String get key => (jsondata["key"] ?? "") as String;