Skip to content

Commit 70481d8

Browse files
committed
v4.0.5
1 parent 8265cba commit 70481d8

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [4.0.5] - 2024-11-27
2+
3+
* Fix `wpAuth` method
4+
15
## [4.0.4] - 2024-11-27
26

37
* Fix auth issue

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In your flutter project add the dependency:
3030
``` dart
3131
dependencies:
3232
...
33-
wp_json_api: ^4.0.4
33+
wp_json_api: ^4.0.5
3434
```
3535

3636
### Usage example #

example/pubspec.lock

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,11 @@ packages:
400400
nylo_support:
401401
dependency: transitive
402402
description:
403-
path: "/Users/anthony/StudioProjects/support"
404-
relative: false
405-
source: path
406-
version: "6.6.0"
403+
name: nylo_support
404+
sha256: "00ccf5ed65db90e6260626baf32803e4d8f5ff536e455fa1402e34448d1ded45"
405+
url: "https://pub.dev"
406+
source: hosted
407+
version: "6.7.0"
407408
path:
408409
dependency: transitive
409410
description:
@@ -783,7 +784,7 @@ packages:
783784
path: ".."
784785
relative: true
785786
source: path
786-
version: "4.0.4"
787+
version: "4.0.5"
787788
xdg_directories:
788789
dependency: transitive
789790
description:

lib/wp_json_api.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import '/models/wp_user.dart';
2323
import '/networking/network_manager.dart';
2424

2525
/// The version of the wp_json_api
26-
String _wpJsonAPIVersion = "4.0.4";
26+
String _wpJsonAPIVersion = "4.0.5";
2727

2828
/// The base class to initialize and use WPJsonAPI
2929
class WPJsonAPI {
@@ -76,9 +76,9 @@ class WPJsonAPI {
7676
}
7777

7878
/// Authenticate a user if they are logged in
79-
static wpAuth() async {
79+
static Future<WpUser?> wpAuth() async {
8080
final data = await storageRead(WPJsonAPI.storageKey());
81-
if (data != null) return null;
81+
if (data == null) return null;
8282
return WpUser.fromJson(data);
8383
}
8484

pubspec.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,11 @@ packages:
400400
nylo_support:
401401
dependency: "direct main"
402402
description:
403-
path: "/Users/anthony/StudioProjects/support"
404-
relative: false
405-
source: path
406-
version: "6.6.0"
403+
name: nylo_support
404+
sha256: "00ccf5ed65db90e6260626baf32803e4d8f5ff536e455fa1402e34448d1ded45"
405+
url: "https://pub.dev"
406+
source: hosted
407+
version: "6.7.0"
407408
path:
408409
dependency: transitive
409410
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wp_json_api
22
description: WordPress and WooCommerce JSON API for Flutter Mobile. API allows you to login, register new users, get users info and more.
3-
version: 4.0.4
3+
version: 4.0.5
44
homepage: https://woosignal.com
55
repository: https://github.com/woosignal/wp-json-api-flutter
66
issue_tracker: https://github.com/woosignal/wp-json-api-flutter/issues

0 commit comments

Comments
 (0)