Merge pull request #15 from Danakcorp/mrtz

Mrtz
This commit is contained in:
morteza-mortezai
2025-10-12 16:47:09 +03:30
committed by GitHub
2 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ abstract class BaseRepository<T> {
} }
async findAll() { async findAll() {
return this.model.find().populate({ path: "fineRule" }).sort({ createdAt: -1 }); return this.model.find().sort({ createdAt: -1 });
} }
async delete(id: string) { async delete(id: string) {
+6 -7
View File
@@ -19,13 +19,12 @@ export class ChatGateway {
this.io = new Server(server, { this.io = new Server(server, {
path: "/ws-chat", path: "/ws-chat",
// addTrailingSlash: false, // addTrailingSlash: false,
// cors: { cors: {
// origin: true, origin: true,
// allowedHeaders: ["Authorization"], allowedHeaders: ["Authorization"],
// credentials: true, credentials: true,
// methods: ["GET", "POST"], methods: ["GET", "POST"],
// }, },
cors: { origin: "*" },
}); });
this.io.on("connection", (socket: Socket) => this.handleConnection(socket)); this.io.on("connection", (socket: Socket) => this.handleConnection(socket));
return this.io; return this.io;