Testing failer uncomment issue sorted API-Docker updated based on the Failed testcase

This commit is contained in:
2025-05-28 09:42:00 +05:30
parent f2cad42d30
commit 41e2075c55
90 changed files with 2485 additions and 4308 deletions

View File

@@ -1,48 +1,30 @@
import mongoose, { Document, Schema } from 'mongoose';
import MainModel from '../../connect/mongoose.ts';
// Interface for TypeScript with PascalCase
export interface wallitems extends Document {
modelUuid: string;
modelName: string
modelfileID: string;
type: string
csgposition: []
csgscale: []
position: []
quaternion: []
scale: []
import { Document, Schema } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
export interface WallItems extends Document {
modelUuid: string;
modelName: string;
modelfileID: string;
type: string;
csgposition: [];
csgscale: [];
position: [];
quaternion: [];
scale: [];
}
// Define the Mongoose Schema
const wallItemsSchema: Schema = new Schema({
modelUuid: { type: String},
modelfileID: { type: String},
modelName: { type: String},
type: { type: String },
csgposition: { type: Array},
csgscale: { type: Array,},
position: { type: Array },
quaternion: { type: Array},
scale: { type: Array}
modelUuid: { type: String },
modelfileID: { type: String },
modelName: { type: String },
type: { type: String },
csgposition: { type: Array },
csgscale: { type: Array },
position: { type: Array },
quaternion: { type: Array },
scale: { type: Array },
});
// const wallItenmModel = (db: string) => {
// const mongoUrl = process.env.MONGO_URI || '';
// if (!mongoUrl) {
// throw new Error('MONGO_URI environment variable is not set');
// }
// // Connect to the database
// const dbConnection = mongoose.createConnection(mongoUrl, {
// dbName: db, // Specify the database name here
// serverSelectionTimeoutMS: 30000,
// });
// return dbConnection.model<wallitenms>('wallitenms', wallItenmsSchema, `wallitenms`);
// }
// export default wallItenmModel;
const wallItenmModel = (db:string) => {
return MainModel(db, "wallitems", wallItemsSchema, "wallitems")
};
export default wallItenmModel;
const wallItenmModel = (db: string) => {
return MainModel(db, "wallitems", wallItemsSchema, "wallitems");
};
export default wallItenmModel;