Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon committed May 20, 2024
1 parent 2a9b097 commit f8db40b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sns/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ bring "./types.w" as types;
bring "./sim.w" as sim;
bring "./tfaws.w" as tfaws;

/// MobileClient is a client for interacting with SNS mobile service.
/// When running the simulator in a non test environment, it will use the
/// actual cloud implementation.
pub class MobileClient impl types.IMobileClient {
inner: types.IMobileClient;
new() {
let target = util.env("WING_TARGET");
if target == "sim" {
this.inner = new sim.MobileClient();
if std.Node.of(this).app.isTestEnvironment {
this.inner = new sim.MobileClient();
} else {
this.inner = new tfaws.MobileClient();
}
} elif target == "tf-aws" {
this.inner = new tfaws.MobileClient();
} else {
Expand Down

0 comments on commit f8db40b

Please sign in to comment.