mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
更新工具箱适配代码
This commit is contained in:
parent
6ace8720c4
commit
c3d998ec34
25 changed files with 29 additions and 31 deletions
|
|
@ -12,9 +12,8 @@ async function routes(fastify, options) {
|
|||
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
|
||||
})
|
||||
|
|
@ -24,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
|
||||
})
|
||||
|
|
@ -37,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
|
||||
})
|
||||
|
|
@ -47,11 +46,10 @@ 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
|
||||
})
|
||||
*/
|
||||
}
|
||||
|
||||
export default routes
|
||||
Loading…
Add table
Add a link
Reference in a new issue