Skip to content

Commit ea856f7

Browse files
authored
Get rid of the unused websearch collection, and the unused endpoint (#607)
* Get rid of the unused websearch collection, and the unused endpoint * removes index * lint
1 parent 332d815 commit ea856f7

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

src/lib/server/database.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { MONGODB_URL, MONGODB_DB_NAME, MONGODB_DIRECT_CONNECTION } from "$env/st
22
import { GridFSBucket, MongoClient } from "mongodb";
33
import type { Conversation } from "$lib/types/Conversation";
44
import type { SharedConversation } from "$lib/types/SharedConversation";
5-
import type { WebSearch } from "$lib/types/WebSearch";
65
import type { AbortedGeneration } from "$lib/types/AbortedGeneration";
76
import type { Settings } from "$lib/types/Settings";
87
import type { User } from "$lib/types/User";
@@ -29,7 +28,6 @@ const abortedGenerations = db.collection<AbortedGeneration>("abortedGenerations"
2928
const settings = db.collection<Settings>("settings");
3029
const users = db.collection<User>("users");
3130
const sessions = db.collection<Session>("sessions");
32-
const webSearches = db.collection<WebSearch>("webSearches");
3331
const messageEvents = db.collection<MessageEvent>("messageEvents");
3432
const bucket = new GridFSBucket(db, { bucketName: "files" });
3533

@@ -41,7 +39,6 @@ export const collections = {
4139
settings,
4240
users,
4341
sessions,
44-
webSearches,
4542
messageEvents,
4643
bucket,
4744
};
@@ -59,7 +56,6 @@ client.on("open", () => {
5956
{ partialFilterExpression: { userId: { $exists: true } } }
6057
)
6158
.catch(console.error);
62-
webSearches.createIndex({ sessionId: 1, updatedAt: -1 }).catch(console.error);
6359
abortedGenerations.createIndex({ updatedAt: 1 }, { expireAfterSeconds: 30 }).catch(console.error);
6460
abortedGenerations.createIndex({ conversationId: 1 }, { unique: true }).catch(console.error);
6561
sharedConversations.createIndex({ hash: 1 }, { unique: true }).catch(console.error);

src/routes/search/[id]/+server.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)