mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
server / username / password now saved to local preferences
This commit is contained in:
parent
2ec662fdef
commit
ee7ab5308e
3 changed files with 29 additions and 55 deletions
|
|
@ -59,6 +59,11 @@ class InvenTreeAPI {
|
|||
address = address.trim();
|
||||
username = username.trim();
|
||||
|
||||
if (address.isEmpty || username.isEmpty || password.isEmpty) {
|
||||
print("Server error: Empty details supplied");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure we are pointing to the correct endpoint
|
||||
if (!address.endsWith("api/") || !address.endsWith("api")) {
|
||||
address = path.join(address, "api");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue