mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
framework: api: fix RedirectResponse
This commit is contained in:
1 file changed
+2
-2
@@ -31,7 +31,7 @@ export const Mutation = _get('Mutation');
|
|||||||
export const Subscription = _get('Subscription');
|
export const Subscription = _get('Subscription');
|
||||||
|
|
||||||
export class BinaryResponse {
|
export class BinaryResponse {
|
||||||
[BINARY]: true;
|
[BINARY] = true;
|
||||||
constructor(public readonly data: Buffer, public filename: string) { }
|
constructor(public readonly data: Buffer, public filename: string) { }
|
||||||
static check(value: any): value is BinaryResponse {
|
static check(value: any): value is BinaryResponse {
|
||||||
return value && typeof value === 'object' && BINARY in value && value[BINARY] === true;
|
return value && typeof value === 'object' && BINARY in value && value[BINARY] === true;
|
||||||
@@ -39,7 +39,7 @@ export class BinaryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class RedirectResponse {
|
export class RedirectResponse {
|
||||||
[REDIRECT]: true;
|
[REDIRECT] = true;
|
||||||
constructor(public readonly url: string) { }
|
constructor(public readonly url: string) { }
|
||||||
static check(value: any): value is RedirectResponse {
|
static check(value: any): value is RedirectResponse {
|
||||||
return value && typeof value === 'object' && REDIRECT in value && value[REDIRECT] === true;
|
return value && typeof value === 'object' && REDIRECT in value && value[REDIRECT] === true;
|
||||||
|
|||||||
Reference in new issue
Block a user