mirror of
https://github.com/zoriya/Aeris.git
synced 2026-06-02 02:46:15 +00:00
Mobile Client: Giving back what belongs to Ceasar: aeris.com => arthichaud.me
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user