perf: share link

This commit is contained in:
archer
2023-07-28 09:38:50 +08:00
parent 36b234c4fd
commit f65a72821b
22 changed files with 171 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
import { connectToDatabase, Bill, User, ShareChat } from '../mongo';
import { connectToDatabase, Bill, User, OutLink } from '../mongo';
import { BillSourceEnum } from '@/constants/user';
import { getModel } from '../utils/data';
import { ChatHistoryItemResType } from '@/types/chat';
@@ -59,7 +59,7 @@ export const updateShareChatBill = async ({
total: number;
}) => {
try {
await ShareChat.findOneAndUpdate(
await OutLink.findOneAndUpdate(
{ shareId },
{
$inc: { total },