]> PHS Git Server - phs-api.git/commitdiff
Removing zencoder from .gitignore and fixing some issues in swagger.json #PA-2.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 27 Sep 2025 03:20:15 +0000 (22:20 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 27 Sep 2025 03:20:15 +0000 (22:20 -0500)
.gitignore
.idea/zencoder-chat-index.xml
.npmrc [new file with mode: 0755]
src/routes/index.js
src/swagger.json

index ce74ae49c8876b4bb519cb45b8736c468a52f050..a3eed709a55f5f674a1f168fdecbe57b1ccde3e4 100755 (executable)
@@ -2,4 +2,5 @@ node_modules/
 pm2logs/
 **/.DS_Store/
 logs/
-bin/
\ No newline at end of file
+bin/
+npmcache/
\ No newline at end of file
index 2009da499d2747bbdb52ec3c926efacc8d79b686..28ae7b1300d38f80228c92fe6446c4e14765ead4 100755 (executable)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ai.zencoder.plugin.chat.index">
-    <option name="chatMetadata" value="{&quot;744c3e10-33d2-414e-91ed-0472ce689be3&quot;:{&quot;id&quot;:&quot;744c3e10-33d2-414e-91ed-0472ce689be3&quot;,&quot;title&quot;:&quot;Postgres Model Definitions Update&quot;,&quot;createdAt&quot;:1757523010531,&quot;updatedAt&quot;:1757523030127,&quot;isAgent&quot;:true,&quot;isNameGenerated&quot;:true,&quot;messageCount&quot;:3,&quot;lastMessagePreview&quot;:&quot;**Modifying model structure**\n\nI need to adjust user.model.js to align with the new schema and creat...&quot;}}" />
+    <option name="activeChatId" value="e1a95f8f-7831-4c3e-ba7d-bc949f94af4b" />
+    <option name="chatMetadata" value="{&quot;e1a95f8f-7831-4c3e-ba7d-bc949f94af4b&quot;:{&quot;id&quot;:&quot;e1a95f8f-7831-4c3e-ba7d-bc949f94af4b&quot;,&quot;title&quot;:&quot;Write some detailed unit tests for our project ...&quot;,&quot;createdAt&quot;:1758942702303,&quot;updatedAt&quot;:1758942703244,&quot;isUnitTestsAgent&quot;:true,&quot;messageCount&quot;:2,&quot;lastMessagePreview&quot;:&quot;&quot;},&quot;744c3e10-33d2-414e-91ed-0472ce689be3&quot;:{&quot;id&quot;:&quot;744c3e10-33d2-414e-91ed-0472ce689be3&quot;,&quot;title&quot;:&quot;Postgres Model Definitions Update&quot;,&quot;createdAt&quot;:1757523010531,&quot;updatedAt&quot;:1757523030127,&quot;isAgent&quot;:true,&quot;isNameGenerated&quot;:true,&quot;messageCount&quot;:3,&quot;lastMessagePreview&quot;:&quot;**Modifying model structure**\n\nI need to adjust user.model.js to align with the new schema and creat...&quot;}}" />
   </component>
 </project>
\ No newline at end of file
diff --git a/.npmrc b/.npmrc
new file mode 100755 (executable)
index 0000000..7cc1863
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+cache=./npmcache
index 9df708677ed235ca4b1035009f707d9c784b4832..d92089a69aa61dd619042e52e1b0024d31a08c10 100755 (executable)
@@ -5,6 +5,8 @@
 
 const express = require( 'express' );
 const router = express.Router();
+const swaggerUi = require( 'swagger-ui-express' );
+const swaggerDocument = require( '../../src/swagger.json' );
 
 /**
  * Configure API routes
@@ -12,6 +14,16 @@ const router = express.Router();
  * @returns {Object} Express router with API routes
  */
 module.exports.APIRoutes = ( passport ) => {
+
+
+// Swagger documentation
+  // noinspection JSCheckFunctionSignatures
+  router.use( '/api-docs', swaggerUi.serve, swaggerUi.setup( swaggerDocument ) );
+  router.get( '/swagger.json', ( req, res ) => {
+    res.setHeader( 'Content-Type', 'application/json' );
+    res.send( swaggerDocument );
+  } );
+
   router.use( '/git', require( './git.routes' )( passport ) );
   router.use( '/docker', require( './docker.routes' )( passport ) );
   router.use( '/vpn', require( './vpn.routes' )( passport ) );
index 8c330fb8f38d89e3aa356e00529aa63a652052cb..838d7fecf0c15a18763134eaba1644f6e7087ad9 100755 (executable)
@@ -13,7 +13,7 @@
     }
   },
   "schemes": ["https", "http"],
-  "host": "api-phasecustomsoft.com",
+  "host": "api.phasecustomsoft.com",
   "basePath": "/",
   "securityDefinitions": {
     "Bearer": {