mirror of
https://github.com/2234839/web-font.git
synced 2025-04-06 05:25:44 +08:00
10 lines
260 B
TypeScript
10 lines
260 B
TypeScript
import { createParamDecorator } from '@nestjs/common';
|
|
import { Request } from 'express';
|
|
|
|
export const req_par = createParamDecorator((data: string, req:Request) => {
|
|
if('host_url'===data){
|
|
return `//${req.headers.host}/`
|
|
}
|
|
return req
|
|
});
|