From cbc3fb263c764a628fe97980feae2d70ba9750cd Mon Sep 17 00:00:00 2001 From: Alameer Ashraf Hassan Date: Fri, 24 Sep 2021 20:43:24 +0200 Subject: [PATCH] Fix an issue of loading service at different applications When service is loaded from different applications layers there will be an error, the new update will fix this issue. --- src/models/post/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/post/post.js b/src/models/post/post.js index 114c4c1..fe839de 100644 --- a/src/models/post/post.js +++ b/src/models/post/post.js @@ -12,7 +12,7 @@ class post { body: { type: String } }); - return mongoose.model("post", schema); + return mongoose.model("post", schema) || mongoose.model('post', schema); } constructModel() {