Merge pull request #1273 from appwrite/feat-add-android-origin
Feat add android origin
This commit is contained in:
commit
51d4729737
2 changed files with 8 additions and 1 deletions
|
@ -13,6 +13,9 @@ class Origin extends Validator
|
|||
const CLIENT_TYPE_FLUTTER_MACOS = 'flutter-macos';
|
||||
const CLIENT_TYPE_FLUTTER_WINDOWS = 'flutter-windows';
|
||||
const CLIENT_TYPE_FLUTTER_LINUX = 'flutter-linux';
|
||||
const CLIENT_TYPE_ANDROID = 'android';
|
||||
const CLIENT_TYPE_IOS = 'ios';
|
||||
|
||||
|
||||
const SCHEME_TYPE_HTTP = 'http';
|
||||
const SCHEME_TYPE_HTTPS = 'https';
|
||||
|
@ -69,6 +72,8 @@ class Origin extends Validator
|
|||
case self::CLIENT_TYPE_FLUTTER_MACOS:
|
||||
case self::CLIENT_TYPE_FLUTTER_WINDOWS:
|
||||
case self::CLIENT_TYPE_FLUTTER_LINUX:
|
||||
case self::CLIENT_TYPE_ANDROID:
|
||||
case self::CLIENT_TYPE_IOS:
|
||||
$this->clients[] = (isset($platform['key'])) ? $platform['key'] : '';
|
||||
break;
|
||||
|
||||
|
@ -90,7 +95,7 @@ class Origin extends Validator
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if Origin has been whiltlisted
|
||||
* Check if Origin has been allowed
|
||||
* for access to the API
|
||||
*
|
||||
* @param mixed $origin
|
||||
|
|
|
@ -55,6 +55,8 @@ class V07 extends Filter {
|
|||
case Response::MODEL_ANY:
|
||||
case Response::MODEL_PREFERENCES: /** ANY was replaced by PREFERENCES in 0.8.x but this is backward compatible with 0.7.x */
|
||||
case Response::MODEL_NONE:
|
||||
case Response::MODEL_ERROR:
|
||||
case Response::MODEL_ERROR_DEV:
|
||||
$parsedResponse = $content;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue