Comparing version 2.0.50 to 2.0.51
@@ -17,3 +17,3 @@ "use strict"; | ||
[path, queryString] = (req.url || '/').split('?'); | ||
if (path === 'get-logs') | ||
if (path === '/get-logs') | ||
return res.writeHead(200, { 'Content-Type': 'application/json' }).end(JSON.stringify(logs)); | ||
@@ -37,3 +37,5 @@ const route = serverRoutes[path]; | ||
}); | ||
if (config?.logs) | ||
if (config?.logs) { | ||
if (logs.length > 100) | ||
logs.pop(); | ||
logs.push({ | ||
@@ -48,2 +50,3 @@ time: new Date().toLocaleString(), | ||
}); | ||
} | ||
if (!result) | ||
@@ -50,0 +53,0 @@ return res.writeHead(200, { 'Content-Type': 'application/json' }).end(JSON.stringify({})); |
{ | ||
"name": "bridge", | ||
"version": "2.0.50", | ||
"version": "2.0.51", | ||
"description": "Bridge is a Typescript Node.js framework that provides an easy and scalable way to create REST APIs while generating the client code.", | ||
@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111819
1223