All files / common/decorators/http redirect.decorator.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 121x         1x 1x 1x 1x      
import { REDIRECT_METADATA } from '../../constants';
 
/**
 * Redirects request.
 */
export function Redirect(url: string): MethodDecorator {
  return (target: object, key, descriptor) => {
    Reflect.defineMetadata(REDIRECT_METADATA, url, descriptor.value);
    return descriptor;
  };
}