Skip to content

Commit 33b8095

Browse files
fix(core): minor versioning tweaks (logging)
1 parent 1187212 commit 33b8095

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/core/helpers/messages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { RequestMethod } from '@nestjs/common/enums/request-method.enum';
22
import {
3-
VERSION_NEUTRAL,
43
VersionValue,
4+
VERSION_NEUTRAL,
55
} from '@nestjs/common/interfaces/version-options.interface';
66

77
export const MODULE_INIT_MESSAGE = (
@@ -20,7 +20,7 @@ export const VERSIONED_ROUTE_MAPPED_MESSAGE = (
2020
if (version === VERSION_NEUTRAL) {
2121
version = 'Neutral';
2222
}
23-
return `Mapped {${path}, ${RequestMethod[method]}}(Version: ${version}) route`;
23+
return `Mapped {${path}, ${RequestMethod[method]}} (version: ${version}) route`;
2424
};
2525

2626
export const CONTROLLER_MAPPING_MESSAGE = (name: string, path: string) =>
@@ -34,7 +34,7 @@ export const VERSIONED_CONTROLLER_MAPPING_MESSAGE = (
3434
if (version === VERSION_NEUTRAL) {
3535
version = 'Neutral';
3636
}
37-
return `${name} {${path}}(Version: ${version}):`;
37+
return `${name} {${path}} (version: ${version}):`;
3838
};
3939

4040
export const INVALID_EXECUTION_CONTEXT = (

packages/core/router/routes-resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class RoutesResolver implements Resolver {
7878
const controllerName = metatype.name;
7979

8080
paths.forEach(path => {
81-
if (controllerVersion) {
81+
if (!controllerVersion) {
8282
this.logger.log(
8383
CONTROLLER_MAPPING_MESSAGE(
8484
controllerName,

0 commit comments

Comments
 (0)