1.3.0
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/server.js",
|
"main": "dist/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default async function companySettingsRoutes(
|
|||||||
const settings = await prisma.company_settings.findFirst({
|
const settings = await prisma.company_settings.findFirst({
|
||||||
select: { [column]: true },
|
select: { [column]: true },
|
||||||
});
|
});
|
||||||
const buf = settings?.[column] as Buffer | null;
|
const buf = settings?.[column] as unknown as Buffer | null;
|
||||||
if (!buf) return error(reply, "Logo nenalezeno", 404);
|
if (!buf) return error(reply, "Logo nenalezeno", 404);
|
||||||
|
|
||||||
let mime = "image/png";
|
let mime = "image/png";
|
||||||
@@ -203,9 +203,15 @@ export default async function companySettingsRoutes(
|
|||||||
max_requests_per_minute: true,
|
max_requests_per_minute: true,
|
||||||
available_vat_rates: true,
|
available_vat_rates: true,
|
||||||
available_currencies: true,
|
available_currencies: true,
|
||||||
|
smtp_from: true,
|
||||||
|
smtp_from_name: true,
|
||||||
|
offer_number_pattern: true,
|
||||||
|
order_number_pattern: true,
|
||||||
|
invoice_number_pattern: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (!settings) return error(reply, "Nastavení nenalezeno", 500);
|
||||||
|
|
||||||
// Check if logo exists
|
// Check if logo exists
|
||||||
const logoCheck = await prisma.company_settings.findFirst({
|
const logoCheck = await prisma.company_settings.findFirst({
|
||||||
@@ -219,9 +225,8 @@ export default async function companySettingsRoutes(
|
|||||||
settings.custom_fields as string | null,
|
settings.custom_fields as string | null,
|
||||||
);
|
);
|
||||||
|
|
||||||
const pkg = await import("../../../package.json", {
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
assert: { type: "json" },
|
const pkg = require("../../../package.json") as { version: string };
|
||||||
});
|
|
||||||
|
|
||||||
let available_vat_rates: number[] = [0, 10, 12, 15, 21];
|
let available_vat_rates: number[] = [0, 10, 12, 15, 21];
|
||||||
try {
|
try {
|
||||||
@@ -255,7 +260,7 @@ export default async function companySettingsRoutes(
|
|||||||
available_currencies,
|
available_currencies,
|
||||||
has_logo,
|
has_logo,
|
||||||
has_logo_dark,
|
has_logo_dark,
|
||||||
app_version: pkg.default.version,
|
app_version: pkg.version,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -264,9 +269,8 @@ export default async function companySettingsRoutes(
|
|||||||
"/system-info",
|
"/system-info",
|
||||||
{ preHandler: requirePermission("settings.manage") },
|
{ preHandler: requirePermission("settings.manage") },
|
||||||
async (request, reply) => {
|
async (request, reply) => {
|
||||||
const pkg = await import("../../../package.json", {
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
assert: { type: "json" },
|
const pkg = require("../../../package.json") as { version: string };
|
||||||
});
|
|
||||||
const uptimeSec = process.uptime();
|
const uptimeSec = process.uptime();
|
||||||
const days = Math.floor(uptimeSec / 86400);
|
const days = Math.floor(uptimeSec / 86400);
|
||||||
const hours = Math.floor((uptimeSec % 86400) / 3600);
|
const hours = Math.floor((uptimeSec % 86400) / 3600);
|
||||||
@@ -299,7 +303,7 @@ export default async function companySettingsRoutes(
|
|||||||
const projectNas = new NasFileManager();
|
const projectNas = new NasFileManager();
|
||||||
|
|
||||||
return success(reply, {
|
return success(reply, {
|
||||||
app_version: pkg.default.version,
|
app_version: pkg.version,
|
||||||
node_version: process.version,
|
node_version: process.version,
|
||||||
platform: `${os.type()} ${os.release()}`,
|
platform: `${os.type()} ${os.release()}`,
|
||||||
uptime: uptimeStr,
|
uptime: uptimeStr,
|
||||||
|
|||||||
Reference in New Issue
Block a user