在旧数据迁移时备份ck文件
This commit is contained in:
parent
d2649e88fd
commit
289fc7a3e6
|
@ -283,8 +283,8 @@ export default class NoteUser extends BaseModel {
|
||||||
setMainUid (uid = '', game = 'gs') {
|
setMainUid (uid = '', game = 'gs') {
|
||||||
let gameKey = this.gameKey(game)
|
let gameKey = this.gameKey(game)
|
||||||
// 兼容传入index
|
// 兼容传入index
|
||||||
if (uid < 100 && this.uidList[gameKey][uid]) {
|
if (uid < 100 && this.uidMap[gameKey][uid]) {
|
||||||
uid = this.uidList[gameKey][uid]?.uid
|
uid = this.uidMap[gameKey][uid]?.uid
|
||||||
}
|
}
|
||||||
if (this.uidMap[gameKey][uid]) {
|
if (this.uidMap[gameKey][uid]) {
|
||||||
this.mainUid[gameKey] = uid
|
this.mainUid[gameKey] = uid
|
||||||
|
|
|
@ -318,11 +318,9 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
await user.save()
|
await user.save()
|
||||||
if (fs.existsSync(`./data/MysCookie/${qq}.yaml`)) {
|
if (fs.existsSync(`./data/MysCookie/${qq}.yaml`)) {
|
||||||
/* fs.rename(`./data/MysCookie/${qq}.yaml`, `./data/MysCookieBak/${qq}.yaml`, (err) => {
|
fs.rename(`./data/MysCookie/${qq}.yaml`, `./data/MysCookieBak/${qq}.yaml`, (err) => {
|
||||||
if (err) {
|
if (err) console.log(err)
|
||||||
console.log(err)
|
})
|
||||||
}
|
|
||||||
}) */
|
|
||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue