mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-29 20:40:35 +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