Fix for missing projects
This commit is contained in:
parent
13a401fbd2
commit
964fee8c51
|
|
@ -37,8 +37,8 @@ class ProjectRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<BuiltList<ProjectEntity>> loadList(
|
Future<BuiltList<ProjectEntity>> loadList(
|
||||||
Credentials credentials, int createdAt, bool filterDeleted) async {
|
Credentials credentials, bool filterDeleted) async {
|
||||||
String url = credentials.url+ '/projects?created_at=$createdAt';
|
String url = credentials.url + '/projects?';
|
||||||
|
|
||||||
if (filterDeleted) {
|
if (filterDeleted) {
|
||||||
url += '&filter_deleted_clients=true';
|
url += '&filter_deleted_clients=true';
|
||||||
|
|
@ -60,7 +60,7 @@ class ProjectRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
final url =
|
final url =
|
||||||
credentials.url+ '/projects/bulk?per_page=$kMaxEntitiesPerBulkAction';
|
credentials.url + '/projects/bulk?per_page=$kMaxEntitiesPerBulkAction';
|
||||||
final dynamic response = await webClient.post(url, credentials.token,
|
final dynamic response = await webClient.post(url, credentials.token,
|
||||||
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
|
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
|
||||||
|
|
||||||
|
|
@ -77,10 +77,10 @@ class ProjectRepository {
|
||||||
|
|
||||||
if (project.isNew) {
|
if (project.isNew) {
|
||||||
response = await webClient.post(
|
response = await webClient.post(
|
||||||
credentials.url+ '/projects', credentials.token,
|
credentials.url + '/projects', credentials.token,
|
||||||
data: json.encode(data));
|
data: json.encode(data));
|
||||||
} else {
|
} else {
|
||||||
final url = credentials.url+ '/projects/${project.id}';
|
final url = credentials.url + '/projects/${project.id}';
|
||||||
response =
|
response =
|
||||||
await webClient.put(url, credentials.token, data: json.encode(data));
|
await webClient.put(url, credentials.token, data: json.encode(data));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,6 @@ Middleware<AppState> _loadProjects(ProjectRepository repository) {
|
||||||
repository
|
repository
|
||||||
.loadList(
|
.loadList(
|
||||||
state.credentials,
|
state.credentials,
|
||||||
state.createdAtLimit,
|
|
||||||
state.filterDeletedClients,
|
state.filterDeletedClients,
|
||||||
)
|
)
|
||||||
.then((data) {
|
.then((data) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue