Revert "sub plan page (#885)" (#886)

This reverts commit 443ad37b6a.
This commit is contained in:
Archer
2024-02-23 17:48:15 +08:00
committed by GitHub
parent 443ad37b6a
commit fd9b6291af
246 changed files with 4281 additions and 6286 deletions

View File

@@ -1,19 +1,18 @@
import axios from 'axios';
import { MongoOutLink } from './schema';
import { FastGPTProUrl } from '../../common/system/constants';
import { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
export const addOutLinkUsage = async ({
export const updateOutLinkUsage = async ({
shareId,
totalPoints
total
}: {
shareId: string;
totalPoints: number;
total: number;
}) => {
MongoOutLink.findOneAndUpdate(
{ shareId },
{
$inc: { usagePoints: totalPoints },
$inc: { total },
lastTime: new Date()
}
).catch((err) => {
@@ -24,13 +23,11 @@ export const addOutLinkUsage = async ({
export const pushResult2Remote = async ({
outLinkUid,
shareId,
appName,
responseData
}: {
outLinkUid?: string; // raw id, not parse
shareId?: string;
appName: string;
responseData?: ChatHistoryItemResType[];
responseData?: any[];
}) => {
if (!shareId || !outLinkUid || !FastGPTProUrl) return;
try {
@@ -45,7 +42,6 @@ export const pushResult2Remote = async ({
url: '/shareAuth/finish',
data: {
token: outLinkUid,
appName,
responseData
}
});