mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正profileRank的报错
This commit is contained in:
parent
7e519fdfe3
commit
fbc52715ee
@ -193,9 +193,9 @@ export default class ProfileRank {
|
|||||||
}
|
}
|
||||||
let data = {}
|
let data = {}
|
||||||
try {
|
try {
|
||||||
data = await redis.get(`miao:rank:uid-info:${uid}`)
|
let uData = await redis.get(`miao:rank:uid-info:${uid}`)
|
||||||
if (data) {
|
if (uData) {
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(uData)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
data = {}
|
data = {}
|
||||||
@ -203,7 +203,7 @@ export default class ProfileRank {
|
|||||||
await redis.set(`miao:rank:uid-info:${uid}`, JSON.stringify({
|
await redis.set(`miao:rank:uid-info:${uid}`, JSON.stringify({
|
||||||
totalCount,
|
totalCount,
|
||||||
basicCount,
|
basicCount,
|
||||||
isSelfUid: !!(isSelfUid || data.isSelfUid)
|
isSelfUid: !!(isSelfUid || data?.isSelfUid)
|
||||||
}), { EX: 3600 * 24 * 365 })
|
}), { EX: 3600 * 24 * 365 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user