Skip to content

Commit 20ca286

Browse files
author
lucifer
committed
feat: 付费提示
1 parent f0b88e3 commit 20ca286

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

middleware/passport.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ module.exports = async function checkAuth(ctx, next) {
3333
ctx.session.user = duser;
3434
await next();
3535
return;
36+
} else {
37+
ctx.body = fail({
38+
message: "本页内容需付费才能查看,请和 lucifer 进行联系~",
39+
code: 93,
40+
});
3641
}
42+
return;
3743
} catch (err) {
3844
console.log("token 解析失败:", err);
3945
return;

0 commit comments

Comments
 (0)