Merge pull request #22 from sijinhui/dev

修复一下图表的bug
This commit is contained in:
sijinhui 2024-02-22 13:15:21 +08:00 committed by GitHub
commit 44ab587752
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 11 deletions

View File

@ -48,7 +48,7 @@ jobs:
- name: Sync repository to tx
run: |
yes | docker image prune
ssh root@tx.xiaosi.cc 'mkdir -p /data/test/ChatGPT-Next-Web'
ssh -o StrictHostKeyChecking=no root@tx.xiaosi.cc 'mkdir -p /data/test/ChatGPT-Next-Web'
rsync -az -e 'ssh -o StrictHostKeyChecking=no' --delete $GITHUB_WORKSPACE/ root@tx.xiaosi.cc:/data/test/ChatGPT-Next-Web
- name: deploy-to-tx
uses: appleboy/ssh-action@master

View File

@ -50,7 +50,7 @@ jobs:
- name: Sync repository to ty
run: |
yes | docker image prune
ssh root@ty.xiaosi.cc 'mkdir -p /data/ChatGPT-Next-Web'
ssh -o StrictHostKeyChecking=no root@ty.xiaosi.cc 'mkdir -p /data/ChatGPT-Next-Web'
rsync -az -e 'ssh -o StrictHostKeyChecking=no' --delete $GITHUB_WORKSPACE/ root@ty.xiaosi.cc:/data/ChatGPT-Next-Web/
- name: deploy-to-ty
uses: appleboy/ssh-action@master
@ -74,7 +74,7 @@ jobs:
- name: Sync repository to tx
run: |
yes | docker image prune
ssh root@tx.xiaosi.cc 'mkdir -p /data/ChatGPT-Next-Web'
ssh -o StrictHostKeyChecking=no root@tx.xiaosi.cc 'mkdir -p /data/ChatGPT-Next-Web'
rsync -az -e 'ssh -o StrictHostKeyChecking=no' --delete $GITHUB_WORKSPACE/ root@tx.xiaosi.cc:/data/ChatGPT-Next-Web
- name: deploy-to-tx
uses: appleboy/ssh-action@master

View File

@ -66,8 +66,8 @@ async function handle(req: NextRequest) {
const todayLog = await prisma.logEntry.findMany({
where: {
createdAt: {
gte: startOfTheDayInTimeZone, // gte 表示 '大于等于'
lte: endOfTheDayInTimeZone, // lte 表示 '小于等于'
gte: startOfTheDayInTimeZone.toISOString(), // gte 表示 '大于等于'
lte: endOfTheDayInTimeZone.toISOString(), // lte 表示 '小于等于'
},
},
include: {

View File

@ -156,7 +156,7 @@ export async function requestLog(
const logData = {
ip: ip,
path: url_path,
// logEntry: JSON.stringify(jsonBody),
logEntry: JSON.stringify(jsonBody),
model: url_path.startsWith("mj/") ? "midjourney" : jsonBody?.model, // 后面尝试请求是添加到参数
userName: h_userName,
};

View File

@ -26,8 +26,6 @@ async function handle(
// console.log("===========4", request_data);
try {
if (request_data?.logEntry) {
// const regex = /\[(.*)]/g;
// const matchResponse = request_data.logEntry.match(regex);
const regex_message = /(?<="content":")(.*?)(?="}[,\]])/g;
const matchAllMessage = request_data.logEntry.match(regex_message);
// console.log(matchAllMessage, "=====");
@ -35,8 +33,6 @@ async function handle(
request_data.logToken =
getTokenLength(matchAllMessage.join(" ")) +
matchAllMessage.length * 3;
} else {
request_data.logToken = 0;
}
delete request_data["logEntry"];
}

View File

@ -10,7 +10,7 @@ const SECURE_COOKIES:boolean = !!process.env.SECURE_COOKIES;
export const authOptions: NextAuthOptions = {
// debug: !VERCEL_DEPLOYMENT,
debug: SECURE_COOKIES,
debug: !SECURE_COOKIES,
useSecureCookies: SECURE_COOKIES,
secret: process.env.NEXTAUTH_SECRET,
providers: [