mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
修复bug和旧代码清理 (#553)
* fix: 修复星火api上下文 * 将无星火ck的情况降低为warn * feat: 添加星火设定自定义代码功能 * 修复星火api模式的一些问题 * 修复导出配置问题 * feat:添加工具箱快捷登录接口 * 添加工具箱快捷登录指令 * 阻止群聊使用快捷登录 * 添加Azure配置支持,修复重复的配置项冲突 * 移除旧版本渲染和新版本帮助 * 添加工具箱 * 更新工具箱替换原有后台 * 更新工具箱适配代码
This commit is contained in:
parent
043b80ddd4
commit
bf761c24da
183 changed files with 1206 additions and 7675 deletions
|
|
@ -3,22 +3,17 @@ import fs from 'fs'
|
|||
|
||||
async function routes(fastify, options) {
|
||||
fastify.get('/page/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
fastify.get('/help/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
fastify.get('/version', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
fastify.get('/auth/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
|
|
@ -28,7 +23,7 @@ async function routes(fastify, options) {
|
|||
if (!user) {
|
||||
reply.redirect(301, '/auth/login')
|
||||
}
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
|
|
@ -41,7 +36,7 @@ async function routes(fastify, options) {
|
|||
if (user.autho === 'admin') {
|
||||
reply.redirect(301, '/admin/settings')
|
||||
}
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
|
|
@ -51,7 +46,7 @@ async function routes(fastify, options) {
|
|||
if (!user || user.autho != 'admin') {
|
||||
reply.redirect(301, '/admin/')
|
||||
}
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/page.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue