mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
refactor(server): use insert instead of save
This commit is contained in:
parent
21a7cb9546
commit
cbce987453
1 changed files with 2 additions and 2 deletions
|
@ -22,11 +22,11 @@ export async function getRelayActor(): Promise<ILocalUser> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addRelay(inbox: string) {
|
export async function addRelay(inbox: string) {
|
||||||
const relay = await Relays.save({
|
const relay = await Relays.insert({
|
||||||
id: genId(),
|
id: genId(),
|
||||||
inbox,
|
inbox,
|
||||||
status: 'requesting',
|
status: 'requesting',
|
||||||
});
|
}).then(x => Relays.findOneOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
const relayActor = await getRelayActor();
|
const relayActor = await getRelayActor();
|
||||||
const follow = await renderFollowRelay(relay, relayActor);
|
const follow = await renderFollowRelay(relay, relayActor);
|
||||||
|
|
Loading…
Reference in a new issue