Mobile Client: Giving back what belongs to Ceasar: aeris.com => arthichaud.me

This commit is contained in:
Arthi-chaud
2022-03-04 15:47:58 +01:00
parent 8c83773d7f
commit ed958eefe8
5 changed files with 32 additions and 19 deletions
@@ -31,9 +31,9 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="aeris.com" />
<data android:scheme="https" />
<data android:scheme="aeris" />
<data android:scheme="http" android:host="arthichaud.me" />
<data android:scheme="https" android:host="arthichaud.me"/>
<data android:scheme="aeris" android:host="arthichaud.me"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
@@ -31,9 +31,9 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="aeris.com" />
<data android:scheme="https" />
<data android:scheme="aeris" />
<data android:scheme="http" android:host="arthichaud.me" />
<data android:scheme="https" android:host="arthichaud.me"/>
<data android:scheme="aeris" android:host="arthichaud.me"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
+1 -1
View File
@@ -55,7 +55,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>aeris.com</string>
<string>arthichaud.me</string>
<key>CFBundleURLSchemes</key>
<array>
<string>aeris</string>
+1 -1
View File
@@ -53,7 +53,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>aeris.com</string>
<string>arthichaud.me</string>
<key>CFBundleURLSchemes</key>
<array>
<string>aeris</string>
+24 -11
View File
@@ -37,8 +37,8 @@ class AerisAPI {
late final String deepLinkRoute;
String _baseRoute = GetIt.I<SharedPreferences>().getString('api')
?? "http://localhost:8080";
String _baseRoute =
GetIt.I<SharedPreferences>().getString('api') ?? "http://localhost:8080";
String get baseRoute => _baseRoute;
set baseRoute(value) => _baseRoute = value;
@@ -47,7 +47,7 @@ class AerisAPI {
if (Platform.isIOS) {
scheme = "aeris";
}
deepLinkRoute = "$scheme://aeris.com";
deepLinkRoute = "$scheme://arthichaud.me";
}
/// Name of the file that contains the JWT used for Aeris' API requestd
@@ -207,27 +207,40 @@ class AerisAPI {
try {
switch (requestType) {
case AerisAPIRequestType.delete:
return await http.delete(_encoreUri(route),
body: jsonEncode(body), headers: header).timeout(duration,
return await http
.delete(_encoreUri(route),
body: jsonEncode(body), headers: header)
.timeout(
duration,
onTimeout: () {
return http.Response('Error', 408);
},);
},
);
case AerisAPIRequestType.get:
return await http.get(_encoreUri(route), headers: header).timeout(
duration,
onTimeout: () {
return http.Response('Error', 408);
},);
},
);
case AerisAPIRequestType.post:
return await http.post(_encoreUri(route), body: jsonEncode(body), headers: header).timeout(duration,
return await http
.post(_encoreUri(route), body: jsonEncode(body), headers: header)
.timeout(
duration,
onTimeout: () {
return http.Response('Error', 408);
},);
},
);
case AerisAPIRequestType.put:
return await http.put(_encoreUri(route), body: jsonEncode(body), headers: header).timeout(duration,
return await http
.put(_encoreUri(route), body: jsonEncode(body), headers: header)
.timeout(
duration,
onTimeout: () {
return http.Response('Error', 408);
},);
},
);
}
} catch (e) {
return http.Response('{}', 400);