数数:埋点

This commit is contained in:
luying
2021-12-14 18:04:00 +08:00
parent b6501ee4a2
commit dd7cf449d6
23 changed files with 357 additions and 72 deletions
+2 -1
View File
@@ -193,10 +193,11 @@ export default class User extends BaseModel {
let user: UserType = await UserModel.findUserByChannel(channelId);
if (!user) {
user = await UserModel.createUserWithChannel(channelId, channelType, channelInfo, token, platform, pkgName, serverType, deviceId, ip);
return { isCreate: true, user};
} else {
user = await UserModel.updateTokenByChannel(channelId, token, deviceId, ip, channelInfo);
return { isCreate: false, user};
}
return user;
}
private static async encryptPass(password: string, salt?: string) {