emilsoftware-utilities 1.3.73 → 1.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Application } from "express";
|
|
2
|
-
import { AccessiOptions } from "./AccessiModule";
|
|
3
2
|
export { StatoRegistrazione } from "./models/StatoRegistrazione";
|
|
4
3
|
export { AccessiModule } from "./AccessiModule";
|
|
5
4
|
export { ILoginResult } from "./Services/AuthService/IAuthService";
|
|
6
|
-
export declare function initializeAccessiModule(app: Application, options:
|
|
5
|
+
export declare function initializeAccessiModule(app: Application, options: any): Promise<void>;
|
|
@@ -21,8 +21,14 @@ var AccessiModule_2 = require("./AccessiModule");
|
|
|
21
21
|
Object.defineProperty(exports, "AccessiModule", { enumerable: true, get: function () { return AccessiModule_2.AccessiModule; } });
|
|
22
22
|
function initializeAccessiModule(app, options) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const
|
|
24
|
+
const expressAdapter = new platform_express_1.ExpressAdapter(app);
|
|
25
|
+
const nestApp = yield core_1.NestFactory.create(AccessiModule_1.AccessiModule.forRoot(options), expressAdapter, { bufferLogs: true });
|
|
26
|
+
// Monta NestJS solo su /api/accessi
|
|
27
|
+
app.use('/api/accessi', expressAdapter.getInstance());
|
|
28
|
+
nestApp.enableCors();
|
|
29
|
+
nestApp.setGlobalPrefix('/accessi'); // Rimuovilo se causa problemi
|
|
25
30
|
yield nestApp.init();
|
|
31
|
+
// Servi Swagger solo per Accessi
|
|
26
32
|
(0, SwaggerConfig_1.serveSwaggerDocs)(nestApp);
|
|
27
33
|
});
|
|
28
34
|
}
|