mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
fix(api): admin/update-meta was not working
This commit is contained in:
parent
f9b5d92176
commit
408d54f2eb
2 changed files with 11 additions and 4 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -10,10 +10,15 @@
|
||||||
You should also include the user name that made the change.
|
You should also include the user name that made the change.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## 12.109.1 (2022/04/02)
|
## 12.x.x (unreleased)
|
||||||
|
|
||||||
### Known issues
|
### Improvements
|
||||||
- two-factor authentication is not working
|
-
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
- API: admin/update-meta was not working
|
||||||
|
|
||||||
|
## 12.109.1 (2022/04/02)
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- API: Renoteが行えない問題を修正
|
- API: Renoteが行えない問題を修正
|
||||||
|
|
|
@ -397,12 +397,14 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await db.transaction(async transactionalEntityManager => {
|
await db.transaction(async transactionalEntityManager => {
|
||||||
const meta = await transactionalEntityManager.findOne(Meta, {
|
const metas = await transactionalEntityManager.find(Meta, {
|
||||||
order: {
|
order: {
|
||||||
id: 'DESC',
|
id: 'DESC',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const meta = metas[0];
|
||||||
|
|
||||||
if (meta) {
|
if (meta) {
|
||||||
await transactionalEntityManager.update(Meta, meta.id, set);
|
await transactionalEntityManager.update(Meta, meta.id, set);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue