Commit ·
9695c2d
1
Parent(s): bcdc830
放弃~
Browse files- hapi-think/index.js +2 -2
- hapi-think/lib/index.js +1 -1
- hapi-think/{event.js → test.js} +2 -3
- package-lock.json +0 -0
- package.json +2 -0
hapi-think/index.js
CHANGED
|
@@ -550,7 +550,7 @@ module.exports = async (app) =>{
|
|
| 550 |
//static files
|
| 551 |
await server.register(require('@hapi/inert'));
|
| 552 |
|
| 553 |
-
//socket 与nextjs > v10 版本HRM websocket 会冲突,
|
| 554 |
// await server.register(require('@hapi/nes'));
|
| 555 |
|
| 556 |
//Plugins
|
|
@@ -580,7 +580,7 @@ module.exports = async (app) =>{
|
|
| 580 |
plugin:require('./cookie'), //cache
|
| 581 |
options:{}
|
| 582 |
},{
|
| 583 |
-
plugin:require('./
|
| 584 |
options:{}
|
| 585 |
},{
|
| 586 |
plugin:require('./upload'), //upload
|
|
|
|
| 550 |
//static files
|
| 551 |
await server.register(require('@hapi/inert'));
|
| 552 |
|
| 553 |
+
//开发环境socket 与nextjs > v10 版本HRM websocket 会冲突,不管放弃热更新,也很多人吐槽官方
|
| 554 |
// await server.register(require('@hapi/nes'));
|
| 555 |
|
| 556 |
//Plugins
|
|
|
|
| 580 |
plugin:require('./cookie'), //cache
|
| 581 |
options:{}
|
| 582 |
},{
|
| 583 |
+
plugin:require('./test'), //test
|
| 584 |
options:{}
|
| 585 |
},{
|
| 586 |
plugin:require('./upload'), //upload
|
hapi-think/lib/index.js
CHANGED
|
@@ -104,7 +104,7 @@ exports.plugin = {
|
|
| 104 |
authenticate: async (request, h) =>{
|
| 105 |
const {url,query} = request;
|
| 106 |
if(url.pathname === '/api/login' && query.type === "loginIn"){
|
| 107 |
-
console.log('登入操作');
|
| 108 |
clearDataRecovery();
|
| 109 |
return h.authenticated({ credentials: true});
|
| 110 |
}else{
|
|
|
|
| 104 |
authenticate: async (request, h) =>{
|
| 105 |
const {url,query} = request;
|
| 106 |
if(url.pathname === '/api/login' && query.type === "loginIn"){
|
| 107 |
+
// console.log('登入操作');
|
| 108 |
clearDataRecovery();
|
| 109 |
return h.authenticated({ credentials: true});
|
| 110 |
}else{
|
hapi-think/{event.js → test.js}
RENAMED
|
@@ -2,12 +2,11 @@
|
|
| 2 |
const {Error} = require('./lib/think');
|
| 3 |
exports.plugin = {
|
| 4 |
pkg: {
|
| 5 |
-
"name": "
|
| 6 |
"version": "1.0.0"
|
| 7 |
},
|
| 8 |
register: async function (server, options) {
|
| 9 |
-
|
| 10 |
-
// const savePath = Path.join(__dirname,'event.json');
|
| 11 |
|
| 12 |
}
|
| 13 |
};
|
|
|
|
| 2 |
const {Error} = require('./lib/think');
|
| 3 |
exports.plugin = {
|
| 4 |
pkg: {
|
| 5 |
+
"name": "test",
|
| 6 |
"version": "1.0.0"
|
| 7 |
},
|
| 8 |
register: async function (server, options) {
|
| 9 |
+
|
|
|
|
| 10 |
|
| 11 |
}
|
| 12 |
};
|
package-lock.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
CHANGED
|
@@ -8,6 +8,8 @@
|
|
| 8 |
"dependencies": {
|
| 9 |
"@aws-sdk/client-s3": "^3.445.0",
|
| 10 |
"@aws-sdk/s3-request-presigner": "^3.445.0",
|
|
|
|
|
|
|
| 11 |
"@faker-js/faker": "^8.3.1",
|
| 12 |
"@hapi/catbox-redis": "^7.0.2",
|
| 13 |
"@hapi/hapi": "^21.3.2",
|
|
|
|
| 8 |
"dependencies": {
|
| 9 |
"@aws-sdk/client-s3": "^3.445.0",
|
| 10 |
"@aws-sdk/s3-request-presigner": "^3.445.0",
|
| 11 |
+
"@emotion/react": "^11.11.4",
|
| 12 |
+
"@emotion/styled": "^11.11.5",
|
| 13 |
"@faker-js/faker": "^8.3.1",
|
| 14 |
"@hapi/catbox-redis": "^7.0.2",
|
| 15 |
"@hapi/hapi": "^21.3.2",
|