Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -993,12 +993,10 @@ def sync_log_media_click(user_id_str: str, category_id_str: str):
|
|
| 993 |
{
|
| 994 |
"$set": {
|
| 995 |
"updatedAt": now,
|
| 996 |
-
"categories.$.lastClickedAt": now
|
| 997 |
-
"ai_edit_last_date": now # 🔹 update date
|
| 998 |
},
|
| 999 |
"$inc": {
|
| 1000 |
-
"categories.$.click_count": 1
|
| 1001 |
-
"ai_edit_complete": 1 # 🔹 increment counter
|
| 1002 |
}
|
| 1003 |
}
|
| 1004 |
)
|
|
@@ -1009,10 +1007,7 @@ def sync_log_media_click(user_id_str: str, category_id_str: str):
|
|
| 1009 |
{ "userId": user_oid },
|
| 1010 |
{
|
| 1011 |
"$setOnInsert": { "createdAt": now,"ai_edit_complete": 0 },
|
| 1012 |
-
"$set": { "updatedAt": now
|
| 1013 |
-
"$inc": {
|
| 1014 |
-
"ai_edit_complete": 1 # 🔹 increment on use
|
| 1015 |
-
},
|
| 1016 |
"$push": {
|
| 1017 |
"categories": {
|
| 1018 |
"categoryId": category_oid,
|
|
|
|
| 993 |
{
|
| 994 |
"$set": {
|
| 995 |
"updatedAt": now,
|
| 996 |
+
"categories.$.lastClickedAt": now
|
|
|
|
| 997 |
},
|
| 998 |
"$inc": {
|
| 999 |
+
"categories.$.click_count": 1
|
|
|
|
| 1000 |
}
|
| 1001 |
}
|
| 1002 |
)
|
|
|
|
| 1007 |
{ "userId": user_oid },
|
| 1008 |
{
|
| 1009 |
"$setOnInsert": { "createdAt": now,"ai_edit_complete": 0 },
|
| 1010 |
+
"$set": { "updatedAt": now},
|
|
|
|
|
|
|
|
|
|
| 1011 |
"$push": {
|
| 1012 |
"categories": {
|
| 1013 |
"categoryId": category_oid,
|