mirror of
https://github.com/inventree/inventree-app.git
synced 2026-10-07 15:52:08 +00:00
Working on implementation of a related field
This commit is contained in:
1 parent
a002ce1e8a
commit
ca4297ae6d
4 files changed
+113
-2
No files matched your search
+7
-1
@@ -128,7 +128,13 @@ class InvenTreeAPI {
|
||||
|
||||
String get imageUrl => _makeUrl("/image/");
|
||||
|
||||
String makeApiUrl(String endpoint) => _makeUrl("/api/" + endpoint);
|
||||
String makeApiUrl(String endpoint) {
|
||||
if (endpoint.startsWith("/api/") || endpoint.startsWith("api/")) {
|
||||
return _makeUrl(endpoint);
|
||||
} else {
|
||||
return _makeUrl("/api/" + endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
String makeUrl(String endpoint) => _makeUrl(endpoint);
|
||||
|
||||
|
||||
Reference in new issue
Block a user