rohanshaw commited on
Commit
a882260
·
verified ·
1 Parent(s): b3d077e

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +1 -7
api.py CHANGED
@@ -161,13 +161,7 @@ async def retrieve_message(image: UploadFile = File(...)):
161
  async def save_user_data(name: str = Form(...), email: str = Form(...), database: AsyncIOMotorClient = Depends(get_database_client)):
162
  try:
163
  # Save user data to MongoDB
164
- users_collection = database[COLLECTION_NAME]
165
- user_data = {
166
- "name": name,
167
- "email": email,
168
- "first_login": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
169
- }
170
- result = await users_collection.insert_one(user_data)
171
 
172
  # Return success response
173
  return {"message": "User data saved successfully"}
 
161
  async def save_user_data(name: str = Form(...), email: str = Form(...), database: AsyncIOMotorClient = Depends(get_database_client)):
162
  try:
163
  # Save user data to MongoDB
164
+
 
 
 
 
 
 
165
 
166
  # Return success response
167
  return {"message": "User data saved successfully"}