mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
clean up data controller
This commit is contained in:
@@ -1,33 +1,25 @@
|
|||||||
import { type ClassController, isDebug, tbValidator as tb } from "core";
|
import { type ClassController, isDebug, tbValidator as tb } from "core";
|
||||||
import { StringEnum, Type, objectCleanEmpty, objectTransform } from "core/utils";
|
import { StringEnum, Type } from "core/utils";
|
||||||
import {
|
import {
|
||||||
DataPermissions,
|
DataPermissions,
|
||||||
type EntityData,
|
type EntityData,
|
||||||
type EntityManager,
|
type EntityManager,
|
||||||
FieldClassMap,
|
|
||||||
type MutatorResponse,
|
type MutatorResponse,
|
||||||
PrimaryField,
|
|
||||||
type RepoQuery,
|
type RepoQuery,
|
||||||
type RepositoryResponse,
|
type RepositoryResponse,
|
||||||
TextField,
|
|
||||||
querySchema
|
querySchema
|
||||||
} from "data";
|
} from "data";
|
||||||
import { Hono } from "hono";
|
import { Hono } from "hono";
|
||||||
import type { Handler } from "hono/types";
|
import type { Handler } from "hono/types";
|
||||||
import type { ModuleBuildContext } from "modules";
|
import type { ModuleBuildContext } from "modules";
|
||||||
import * as SystemPermissions from "modules/permissions";
|
import * as SystemPermissions from "modules/permissions";
|
||||||
import { type AppDataConfig, FIELDS } from "../data-schema";
|
import type { AppDataConfig } from "../data-schema";
|
||||||
|
|
||||||
export class DataController implements ClassController {
|
export class DataController implements ClassController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly ctx: ModuleBuildContext,
|
private readonly ctx: ModuleBuildContext,
|
||||||
private readonly config: AppDataConfig
|
private readonly config: AppDataConfig
|
||||||
) {
|
) {}
|
||||||
/*console.log(
|
|
||||||
"data controller",
|
|
||||||
this.em.entities.map((e) => e.name)
|
|
||||||
);*/
|
|
||||||
}
|
|
||||||
|
|
||||||
get em(): EntityManager<any> {
|
get em(): EntityManager<any> {
|
||||||
return this.ctx.em;
|
return this.ctx.em;
|
||||||
|
|||||||
Reference in New Issue
Block a user