refactor: clean up whitespace and formatting in multiple files

This commit is contained in:
Simon Larsen
2025-05-28 16:18:31 +01:00
parent 943075e562
commit e69b700dad
4 changed files with 12 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
enum ConfigLogLevel {
enum ConfigLogLevel {
INFO = "INFO",
WARN = "WARN",
ERROR = "ERROR",
@@ -6,4 +6,4 @@
OFF = "OFF",
}
export default ConfigLogLevel;
export default ConfigLogLevel;

View File

@@ -83,6 +83,7 @@ export default class OpenAPIUtil {
const generator: OpenApiGeneratorV3 = new OpenApiGeneratorV3(
registry.definitions,
);
const components: Pick<any, "components"> = generator.generateComponents();
return {

View File

@@ -27,7 +27,6 @@ import UserType from "../../../Types/UserType";
import getJestMockFunction, { MockFunction } from "../../MockType";
import ConfigLogLevel from "../../../Server/Types/ConfigLogLevel";
jest.mock("../../../Server/Utils/Express", () => {
return {
getRouter: () => {

View File

@@ -153,8 +153,6 @@ export class ModelSchema {
];
}
public static getQueryModelSchema(data: {
modelType: new () => DatabaseBaseModel;
}): ModelSchemaType {
@@ -196,17 +194,18 @@ export class ModelSchema {
if (!column) {
continue;
}
const isSortable: boolean =
ModelSchema.getSortableTypes().includes(column.type);
const isSortable: boolean = ModelSchema.getSortableTypes().includes(
column.type,
);
if (!isSortable) {
continue;
}
shape[key] = z.enum([SortOrder.Ascending, SortOrder.Descending]).optional();
shape[key] = z
.enum([SortOrder.Ascending, SortOrder.Descending])
.optional();
}
return z.object(shape);
@@ -232,10 +231,9 @@ export class ModelSchema {
// if its entity array or entity then you can select nested properties
if (
!data.isNested &&
column.modelType && (
column.type === TableColumnType.EntityArray ||
column.type === TableColumnType.Entity
)
column.modelType &&
(column.type === TableColumnType.EntityArray ||
column.type === TableColumnType.Entity)
) {
// can only do one level of nesting
shape[key] = this.getSelectModelSchema({