Skip to content

Commit

Permalink
rm mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjonas committed Jul 25, 2023
1 parent 72ca73e commit 10dde9a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 96 deletions.
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ module.exports = {
BASE_URL:process.env.BASE_URL,
SPEC_HASH:process.env.SPEC_HASH,
API_KEY:process.env.API_KEY,
MONGO_URL:process.env.MONGO_URL,
MONGO_DB_NAME:process.env.MONGO_DB_NAME,
COLLECTION_NAME:process.env.COLLECTION_NAME,
ES_URL:process.env.ES_URL,
ES_AUTHORIZATION_TOKEN:process.env.ES_AUTHORIZATION_TOKEN,
Expand All @@ -30,8 +28,6 @@ module.exports = {
SUPABASE_URL: process.env.SUPABASE_URL,
SUPABASE_ANON_KEY: process.env.SUPABASE_ANON_KEY,
DB_NAME: process.env.DB_NAME,
MONGO_URL:process.env.MONGO_URL,
MONGO_DB_NAME:process.env.MONGO_DB_NAME,
COLLECTION_NAME:process.env.COLLECTION_NAME,
ES_URL:process.env.ES_URL,
ES_AUTHORIZATION_TOKEN:process.env.ES_AUTHORIZATION_TOKEN,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"http-adapter": "^0.0.2",
"keyword-extractor": "^0.0.25",
"langchain": "^0.0.91",
"mongodb": "^5.3.0",
"next": "13.1.6",
"next-axiom": "^0.17.0",
"next-connect": "^0.13.0",
Expand Down
63 changes: 0 additions & 63 deletions src/pages/api/mongo.ts

This file was deleted.

28 changes: 0 additions & 28 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,34 +191,6 @@ export default function Home() {
});
};

const addDocumentToMongoDB = async (payload: any) => {
const response = await fetch("/api/mongo", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const { data } = await response.json();
return data;
};
const getDocumentInMongoDB = async (uniqueId: string) => {
const response = await fetch("/api/mongo?unique=" + uniqueId, {
method: "GET",
headers: { "Content-Type": "application/json" },
});
const { data } = await response.json();
return data;
};

const updateDocumentInMongoDB = async (uniqueId: string, payload: any) => {
const response = await fetch("/api/mongo?unique=" + uniqueId, {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const { data } = await response.json();
return data;
};

const fetchESResult = async (query: string, author?: string) => {
const response = await fetch("/api/search", {
method: "POST",
Expand Down

0 comments on commit 10dde9a

Please sign in to comment.