Initial commit - Event Planner application
This commit is contained in:
17
node_modules/@mikro-orm/nestjs/middleware.helper.js
generated
vendored
Normal file
17
node_modules/@mikro-orm/nestjs/middleware.helper.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { HttpStatus } from '@nestjs/common';
|
||||
export function forRoutesPath(options, consumer) {
|
||||
if (options.forRoutesPath) {
|
||||
return options.forRoutesPath;
|
||||
}
|
||||
// detect nest v11 based on a newly added enum value
|
||||
if (HttpStatus.MULTI_STATUS) {
|
||||
return '{*all}';
|
||||
}
|
||||
const isFastify = (consumer) => {
|
||||
if (typeof consumer.httpAdapter !== 'object') {
|
||||
return false;
|
||||
}
|
||||
return consumer.httpAdapter.constructor.name.toLowerCase().startsWith('fastify');
|
||||
};
|
||||
return isFastify(consumer) ? '(.*)' : '*';
|
||||
}
|
||||
Reference in New Issue
Block a user