Fix for missing projects

This commit is contained in:
Hillel Coren 2024-01-02 16:24:35 +02:00
parent 13a401fbd2
commit 964fee8c51
2 changed files with 5 additions and 6 deletions

View File

@ -37,8 +37,8 @@ class ProjectRepository {
}
Future<BuiltList<ProjectEntity>> loadList(
Credentials credentials, int createdAt, bool filterDeleted) async {
String url = credentials.url+ '/projects?created_at=$createdAt';
Credentials credentials, bool filterDeleted) async {
String url = credentials.url + '/projects?';
if (filterDeleted) {
url += '&filter_deleted_clients=true';
@ -60,7 +60,7 @@ class ProjectRepository {
}
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,
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@ -77,10 +77,10 @@ class ProjectRepository {
if (project.isNew) {
response = await webClient.post(
credentials.url+ '/projects', credentials.token,
credentials.url + '/projects', credentials.token,
data: json.encode(data));
} else {
final url = credentials.url+ '/projects/${project.id}';
final url = credentials.url + '/projects/${project.id}';
response =
await webClient.put(url, credentials.token, data: json.encode(data));
}

View File

@ -227,7 +227,6 @@ Middleware<AppState> _loadProjects(ProjectRepository repository) {
repository
.loadList(
state.credentials,
state.createdAtLimit,
state.filterDeletedClients,
)
.then((data) {