mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +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 class BinaryResponse {
|
||||
[BINARY]: true;
|
||||
[BINARY] = true;
|
||||
constructor(public readonly data: Buffer, public filename: string) { }
|
||||
static check(value: any): value is BinaryResponse {
|
||||
return value && typeof value === 'object' && BINARY in value && value[BINARY] === true;
|
||||
@@ -39,7 +39,7 @@ export class BinaryResponse {
|
||||
}
|
||||
|
||||
export class RedirectResponse {
|
||||
[REDIRECT]: true;
|
||||
[REDIRECT] = true;
|
||||
constructor(public readonly url: string) { }
|
||||
static check(value: any): value is RedirectResponse {
|
||||
return value && typeof value === 'object' && REDIRECT in value && value[REDIRECT] === true;
|
||||
|
||||
Reference in new issue
Block a user