mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +00:00
Update API function to grab user token
- https://github.com/inventree/InvenTree/pull/735
This commit is contained in:
parent
c2e398463f
commit
51a877e8d7
@ -231,7 +231,7 @@ class InvenTreeAPI {
|
|||||||
// Clear out the token
|
// Clear out the token
|
||||||
_token = "";
|
_token = "";
|
||||||
|
|
||||||
response = await post(_URL_GET_TOKEN, body: {"username": _username, "password": _password}).catchError((error) {
|
response = await get(_URL_GET_TOKEN).timeout(Duration(seconds: 10)).catchError((error) {
|
||||||
print("Error requesting token:");
|
print("Error requesting token:");
|
||||||
print(error);
|
print(error);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user