mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-09-20 01:31:59 +03:00
refactor(server): use insert instead of save
This commit is contained in:
parent
6be1db00d1
commit
f25777f2d2
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue