fix of 34492f3c9a
This commit is contained in:
parent
8876ae09ed
commit
b57ee4dd96
|
@ -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 New Issue