mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
refactor: clean up whitespace and formatting in multiple files
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -83,6 +83,7 @@ export default class OpenAPIUtil {
|
||||
const generator: OpenApiGeneratorV3 = new OpenApiGeneratorV3(
|
||||
registry.definitions,
|
||||
);
|
||||
|
||||
const components: Pick<any, "components"> = generator.generateComponents();
|
||||
|
||||
return {
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user