mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-08 17:08:59 +08:00
fix: NO_LIMIT_SEND_ROLE no access token (#400)
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## main(v0.7.2)
|
## main(v0.7.2)
|
||||||
|
|
||||||
- fix: worker 增加 `NO_LIMIT_SEND_ROLE` 配置, 有时加载失败的问题
|
- fix: worker 增加 `NO_LIMIT_SEND_ROLE` 配置, 加载失败的问题
|
||||||
|
|
||||||
## v0.7.1
|
## v0.7.1
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ export default {
|
|||||||
&&
|
&&
|
||||||
c.env.ADMIN_USER_ROLE === user_role?.role
|
c.env.ADMIN_USER_ROLE === user_role?.role
|
||||||
);
|
);
|
||||||
const access_token = is_admin ? await Jwt.sign({
|
const access_token = user_role?.role ? await Jwt.sign({
|
||||||
user_email: user.user_email,
|
user_email: user.user_email,
|
||||||
user_id: user.user_id,
|
user_id: user.user_id,
|
||||||
user_role: user_role?.role,
|
user_role: user_role.role,
|
||||||
iat: Math.floor(Date.now() / 1000),
|
iat: Math.floor(Date.now() / 1000),
|
||||||
// 1 hour
|
// 1 hour
|
||||||
exp: Math.floor(Date.now() / 1000) + 3600,
|
exp: Math.floor(Date.now() / 1000) + 3600,
|
||||||
|
|||||||
Reference in New Issue
Block a user