mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-01 05:16:44 -06:00
fix of 34492f3c9a
This commit is contained in:
parent
8876ae09ed
commit
b57ee4dd96
1 changed files with 9 additions and 1 deletions
|
@ -66,7 +66,15 @@ export class FederatedInstanceService {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async update(id: Instance['id'], data: Partial<Instance>): Promise<void> {
|
public async update(id: Instance['id'], data: Partial<Instance>): Promise<void> {
|
||||||
const result = await this.instancesRepository.update(id, data);
|
const result = await this.instancesRepository.createQueryBuilder().update()
|
||||||
|
.set(data)
|
||||||
|
.where('id = :id', { id })
|
||||||
|
.returning('*')
|
||||||
|
.execute()
|
||||||
|
.then((response) => {
|
||||||
|
return response.raw[0];
|
||||||
|
});
|
||||||
|
|
||||||
const updated = result.raw[0];
|
const updated = result.raw[0];
|
||||||
|
|
||||||
this.federatedInstanceCache.set(updated.host, updated);
|
this.federatedInstanceCache.set(updated.host, updated);
|
||||||
|
|
Loading…
Reference in a new issue