Skip to content

Commit

Permalink
Fix an issue of loading service at different applications
Browse files Browse the repository at this point in the history
When service is loaded from different applications layers there will be an error, the new update will fix this issue.
  • Loading branch information
AlameerAshraf authored Sep 24, 2021
1 parent b206470 commit cbc3fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/post/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class post {
body: { type: String }
});

return mongoose.model("post", schema);
return mongoose.model("post", schema) || mongoose.model('post', schema);
}

constructModel() {
Expand Down

0 comments on commit cbc3fb2

Please sign in to comment.