fix: jwt verfiy

This commit is contained in:
Innei
2022-06-12 12:39:59 +08:00
parent 71029fbefe
commit 102b0723a5
9 changed files with 62 additions and 14 deletions

2
patch/bootstrap.js vendored
View File

@@ -9,7 +9,7 @@ Object.assign(global, { isDev: false })
const result = ts.transpileModule(
readFileSync(appConfigFile, { encoding: 'utf-8' }),
{
compilerOptions: { module: ts.ModuleKind.CommonJS },
compilerOptions: { module: ts.ModuleKind.CommonJS, esModuleInterop: true },
},
)
const complied = result.outputText

7
patch/v3.30.0.js Normal file
View File

@@ -0,0 +1,7 @@
// patch for version lower than v2.0.0-alpha.1
const bootstrap = require('./bootstrap')
bootstrap(async (db) => {
await db.collection('users').updateMany({}, { $unset: { authCode: 1 } })
})