mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: api will plugin mongoMeili without a valid connection
This commit is contained in:
parent
94c0fbb525
commit
194051e424
7 changed files with 167 additions and 144 deletions
|
|
@ -49,16 +49,16 @@ const configSchema = mongoose.Schema(
|
|||
);
|
||||
|
||||
// Instance method
|
||||
ConfigSchema.methods.incrementCount = function () {
|
||||
configSchema.methods.incrementCount = function () {
|
||||
this.startupCounts += 1;
|
||||
};
|
||||
|
||||
// Static methods
|
||||
ConfigSchema.statics.findByTag = async function (tag) {
|
||||
configSchema.statics.findByTag = async function (tag) {
|
||||
return await this.findOne({ tag });
|
||||
};
|
||||
|
||||
ConfigSchema.statics.updateByTag = async function (tag, update) {
|
||||
configSchema.statics.updateByTag = async function (tag, update) {
|
||||
return await this.findOneAndUpdate({ tag }, update, { new: true });
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue