refactor: CachedData.addToList(str -> obj)

This commit is contained in:
MoonLeeeaf
2024-06-28 21:54:30 +08:00
parent 7f1479ffda
commit 9d0eb8c4f8

View File

@@ -215,9 +215,9 @@ class CachedData {
* @param {Object} 欲缓存的对象
* @returns {String} 该对象的ID
*/
static addToList(str) {
let id = Hash.sha256(str)
this.cache[id] = str
static addToList(obj) {
let id = Hash.sha256(obj)
this.cache[id] = obj
return id
}
/**