Merge branch 'main' of https://gitlab.com/uniqdev/web/chat-faq
Browse files- pages/manage_faqs.py +2 -1
pages/manage_faqs.py
CHANGED
|
@@ -3,6 +3,7 @@ import pandas as pd
|
|
| 3 |
from pymongo import MongoClient
|
| 4 |
from dependency import get_manager, load_db
|
| 5 |
from bson.objectid import ObjectId
|
|
|
|
| 6 |
|
| 7 |
cookie_manager = get_manager()
|
| 8 |
auth_state = cookie_manager.get(cookie='auth_state')
|
|
@@ -39,7 +40,7 @@ with st.sidebar:
|
|
| 39 |
"title": new_title,
|
| 40 |
"questions": new_questions_list,
|
| 41 |
"answer": new_answer,
|
| 42 |
-
"time_updated":
|
| 43 |
})
|
| 44 |
st.success("New FAQ added successfully!")
|
| 45 |
|
|
|
|
| 3 |
from pymongo import MongoClient
|
| 4 |
from dependency import get_manager, load_db
|
| 5 |
from bson.objectid import ObjectId
|
| 6 |
+
from datetime import datetime
|
| 7 |
|
| 8 |
cookie_manager = get_manager()
|
| 9 |
auth_state = cookie_manager.get(cookie='auth_state')
|
|
|
|
| 40 |
"title": new_title,
|
| 41 |
"questions": new_questions_list,
|
| 42 |
"answer": new_answer,
|
| 43 |
+
"time_updated": datetime.now().timestamp() * 1000
|
| 44 |
})
|
| 45 |
st.success("New FAQ added successfully!")
|
| 46 |
|