MCPcopy
hub / github.com/dqzboy/Docker-Proxy / updateUserLoginInfo

Method updateUserLoginInfo

hubcmdui/services/userServiceDB.js:61–73  ·  view source on GitHub ↗

* 更新用户登录信息

(username)

Source from the content-addressed store, hash-verified

59 * 更新用户登录信息
60 */
61 async updateUserLoginInfo(username) {
62 try {
63 const user = await this.getUserByUsername(username);
64 if (user) {
65 await database.run(
66 'UPDATE users SET login_count = login_count + 1, last_login = ? WHERE username = ?',
67 [new Date().toISOString(), username]
68 );
69 }
70 } catch (error) {
71 logger.error('更新用户登录信息失败:', error);
72 }
73 }
74
75 /**
76 * 获取用户统计信息

Callers 2

auth.jsFile · 0.80

Calls 2

getUserByUsernameMethod · 0.95
runMethod · 0.80

Tested by

no test coverage detected