Updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "@/package-shared/types/dsql";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
type Params = {
|
||||
userId: number | string;
|
||||
database: DSQL_DATASQUIREL_USER_DATABASES;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DSQL_DatabaseSchemaType } from "@/package-shared/types";
|
||||
import { DSQL_DatabaseSchemaType } from "../../types";
|
||||
type Params = {
|
||||
userId?: string | number;
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = grabUserSchemaData;
|
||||
const serverError_1 = __importDefault(require("./serverError"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const grab_dir_names_1 = __importDefault(require("@/package-shared/utils/backend/names/grab-dir-names"));
|
||||
const client_exports_1 = require("@/client-exports");
|
||||
const grab_dir_names_1 = __importDefault(require("../../utils/backend/names/grab-dir-names"));
|
||||
const ejson_1 = __importDefault(require("../../utils/ejson"));
|
||||
/**
|
||||
* # Grab User Schema Data
|
||||
*/
|
||||
@@ -16,7 +16,7 @@ function grabUserSchemaData({ userId, }) {
|
||||
try {
|
||||
const { userSchemaMainJSONFilePath } = (0, grab_dir_names_1.default)({ userId });
|
||||
const schemaJSON = fs_1.default.readFileSync(userSchemaMainJSONFilePath || "", "utf-8");
|
||||
const schemaObj = client_exports_1.EJSON.parse(schemaJSON);
|
||||
const schemaObj = ejson_1.default.parse(schemaJSON);
|
||||
return schemaObj;
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = setUserSchemaData;
|
||||
const serverError_1 = __importDefault(require("./serverError"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const grab_dir_names_1 = __importDefault(require("@/package-shared/utils/backend/names/grab-dir-names"));
|
||||
const grab_dir_names_1 = __importDefault(require("../../utils/backend/names/grab-dir-names"));
|
||||
/**
|
||||
* # Set User Schema Data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user