mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
添加工具箱
This commit is contained in:
parent
6330eeb399
commit
b966a09058
66 changed files with 1064 additions and 10 deletions
|
|
@ -7,11 +7,6 @@ async function routes(fastify, options) {
|
|||
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')
|
||||
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')
|
||||
reply.type('text/html').send(stream)
|
||||
|
|
@ -46,6 +41,7 @@ async function routes(fastify, options) {
|
|||
return reply
|
||||
})
|
||||
fastify.get('/admin/settings', async (request, reply) => {
|
||||
/*
|
||||
const token = request.cookies.token || request.body?.token || 'unknown'
|
||||
const user = UserInfo(token)
|
||||
if (!user || user.autho != 'admin') {
|
||||
|
|
@ -53,6 +49,13 @@ async function routes(fastify, options) {
|
|||
}
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
reply.type('text/html').send(stream)
|
||||
*/
|
||||
reply.redirect('/tools/')
|
||||
return reply
|
||||
})
|
||||
fastify.get('/tools/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/tools/index.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue