add note
This commit is contained in:
parent
9feb6b0f5b
commit
1057da1556
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ export class CustomEmojiService {
|
|||
fetcher: () => this.emojisRepository.find({ where: { host: IsNull() } }).then(emojis => new Map(emojis.map(emoji => [emoji.name, emoji]))),
|
||||
toRedisConverter: (value) => JSON.stringify(value.values()),
|
||||
fromRedisConverter: (value) => {
|
||||
// 原因不明だが配列以外が入ってくることがあるため
|
||||
if (!Array.isArray(JSON.parse(value))) return undefined;
|
||||
return new Map(JSON.parse(value).map((x: Emoji) => [x.name, x]));
|
||||
}, // TODO: Date型の変換
|
||||
|
|
Loading…
Reference in a new issue