增加说明和登录优化
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ class PixivAuth {
|
||||
|
||||
this.accessToken = tokenData.access_token;
|
||||
this.refreshToken = tokenData.refresh_token;
|
||||
|
||||
|
||||
// 如果响应中包含用户信息,则保存
|
||||
if (tokenData.user) {
|
||||
this.user = tokenData.user;
|
||||
|
||||
+3
-3
@@ -108,9 +108,9 @@ class PixivServer {
|
||||
// 如果是API请求,返回JSON格式的404
|
||||
if (req.path.startsWith('/api/')) {
|
||||
return res.status(404).json({
|
||||
error: 'Not Found',
|
||||
message: `Route ${req.originalUrl} not found`
|
||||
});
|
||||
error: 'Not Found',
|
||||
message: `Route ${req.originalUrl} not found`
|
||||
});
|
||||
}
|
||||
|
||||
// 否则返回前端页面(SPA路由支持)
|
||||
|
||||
Reference in New Issue
Block a user