Compare commits
5 Commits
SEND004
...
4ec934c96b
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ec934c96b | |||
|
|
19df740550 | ||
| 1079ad7d0a | |||
|
|
660f689a7a | ||
|
|
8115abb569 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,4 +8,5 @@ devtools_options.yaml
|
||||
untranslated.txt
|
||||
generate_protos.sh
|
||||
update_dep.sh
|
||||
.vscode/
|
||||
.vscode/
|
||||
.gocache/
|
||||
@@ -16,8 +16,7 @@ api:
|
||||
CORS:
|
||||
max_age: 300
|
||||
allowed_origins:
|
||||
- "http://*"
|
||||
- "https://*"
|
||||
- "*"
|
||||
allowed_methods:
|
||||
- "GET"
|
||||
- "POST"
|
||||
|
||||
@@ -35,6 +35,8 @@ class OrganizationsProvider extends ChangeNotifier {
|
||||
_setResource(_resource.copyWith(isLoading: true, error: null));
|
||||
try {
|
||||
final orgs = await OrganizationService.list();
|
||||
// keep fetched organizations so _org can resolve against them
|
||||
_setResource(Resource(data: orgs, isLoading: true));
|
||||
// fetch stored org
|
||||
String? org = await SecureStorageService.get(Constants.currentOrgKey);
|
||||
// check stored org availability
|
||||
@@ -54,6 +56,7 @@ class OrganizationsProvider extends ChangeNotifier {
|
||||
_setResource(_resource.copyWith(isLoading: true, error: null));
|
||||
try {
|
||||
final org = await OrganizationService.loadByInvitation(invitationRef);
|
||||
_setResource(Resource(data: [org], isLoading: true));
|
||||
await setCurrentOrganization(org.id);
|
||||
_setResource(Resource(data: [org], isLoading: false));
|
||||
return org;
|
||||
|
||||
Reference in New Issue
Block a user