mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 02:05:29 +00:00
Working on implementation of a related field
This commit is contained in:
@ -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