mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-13 12:56:58 +08:00
feat: 模块版文件中增加 token 路由
This commit is contained in:
@@ -140,7 +140,7 @@ async function signToken(req, res) {
|
||||
);
|
||||
}
|
||||
}
|
||||
const secret = eval('process.env.SUB_STORE_FRONTEND_BACKEND_PATH');
|
||||
// const secret = eval('process.env.SUB_STORE_FRONTEND_BACKEND_PATH');
|
||||
const nanoid = eval(`require("nanoid")`);
|
||||
const tokens = $.read(TOKENS_KEY) || [];
|
||||
// const now = Date.now();
|
||||
@@ -166,7 +166,7 @@ async function signToken(req, res) {
|
||||
$.write(tokens, TOKENS_KEY);
|
||||
return success(res, {
|
||||
token,
|
||||
secret,
|
||||
// secret,
|
||||
});
|
||||
} catch (e) {
|
||||
return failed(
|
||||
|
||||
Reference in New Issue
Block a user