chat-ui-energy / src /lib /migrations /routines /07-reset-tools-in-settings.ts
nsarrazin's picture
nsarrazin HF Staff
feat: Update featured workflow to allow user to submit featured requests (#1510)
69c6804 unverified
raw
history blame contribute delete
423 Bytes
import type { Migration } from ".";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
const resetTools: Migration = {
_id: new ObjectId("000000000000000000000007"),
name: "Reset tools to empty",
up: async () => {
const { settings } = collections;
await settings.updateMany({}, { $set: { tools: [] } });
return true;
},
runEveryTime: false,
};
export default resetTools;