|
|
@@ -7,7 +7,8 @@ export class Cookie {
|
|
|
static async handle (ctx: ExtendableContext, next: Next): Promise<unknown> {
|
|
|
const ghID = ctx.request.header.ghid
|
|
|
if (!ghID || typeof ghID !== 'string') {
|
|
|
- throw new Error('缺少ghID')
|
|
|
+ ctx.body = { code: 403, msg: '缺少ghID' }
|
|
|
+ return
|
|
|
}
|
|
|
// 从redis中获取,获取不到的话,直接拉接口
|
|
|
let data:IOneLoadKeyResponse = JSON.parse(await miniGameService.getCookie4Redis(ghID))
|