1
0
forked from mirror/misskey

fix query

This commit is contained in:
syuilo 2022-03-27 16:16:13 +09:00
parent d113aae217
commit 4e139d2aae

View File

@ -8,12 +8,14 @@ export async function fetchMeta(noCache = false): Promise<Meta> {
return await db.transaction(async transactionalEntityManager => {
// 過去のバグでレコードが複数出来てしまっている可能性があるので新しいIDを優先する
const meta = await transactionalEntityManager.findOne(Meta, {
const metas = await transactionalEntityManager.find(Meta, {
order: {
id: 'DESC',
},
});
const meta = metas[0];
if (meta) {
cache = meta;
return meta;