refactor(server): use insert instead of save

This commit is contained in:
syuilo 2022-01-03 03:17:16 +09:00
parent 21a7cb9546
commit cbce987453

View file

@ -22,11 +22,11 @@ export async function getRelayActor(): Promise<ILocalUser> {
}
export async function addRelay(inbox: string) {
const relay = await Relays.save({
const relay = await Relays.insert({
id: genId(),
inbox,
status: 'requesting',
});
}).then(x => Relays.findOneOrFail(x.identifiers[0]));
const relayActor = await getRelayActor();
const follow = await renderFollowRelay(relay, relayActor);