Skip to content

Commit 749fac6

Browse files
committed
Fix for custom exception
1 parent cb8bed0 commit 749fac6

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ install:
1919
deploy:
2020
provider: script
2121
skip_cleanup: true
22-
script: pub publish -f
22+
script: dart format ./lib/ && pub publish -f
2323
on:
2424
tags: true

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.1
2+
3+
- Minor fixes for custom exceptions
4+
15
## 0.3.0
26

37
- Improved code quality

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^0.3.0
26+
dart_appwrite: ^0.3.1
2727
```
2828
2929
You can install packages from the command line:

lib/client.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Client {
1313

1414
this.headers = {
1515
'content-type': 'application/json',
16-
'x-sdk-version': 'appwrite:dart:0.3.0',
16+
'x-sdk-version': 'appwrite:dart:0.3.1',
1717
};
1818

1919
this.config = {};
@@ -86,17 +86,17 @@ class Client {
8686
try {
8787

8888
if(headers['content-type'] == 'multipart/form-data') {
89-
return http.request(path, data: FormData.fromMap(params), options: options);
89+
return await http.request(path, data: FormData.fromMap(params), options: options);
9090
}
9191

9292
if (method == HttpMethod.get) {
9393
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
9494
params[key] = params[key].toString();
9595
}});
9696

97-
return http.get(path, queryParameters: params, options: options);
97+
return await http.get(path, queryParameters: params, options: options);
9898
} else {
99-
return http.request(path, data: params, options: options);
99+
return await http.request(path, data: params, options: options);
100100
}
101101
} on DioError catch(e) {
102102
if(e.response == null) {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 0.3.0
2+
version: 0.3.1
33
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

0 commit comments

Comments
 (0)