refactor: remove default export for request

This commit is contained in:
Johann150 2022-12-11 15:14:59 +01:00
parent 985a13f47f
commit 14a9b9bedd
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
import { URL } from 'node:url'; import { URL } from 'node:url';
import Bull from 'bull'; import Bull from 'bull';
import request from '@/remote/activitypub/request.js'; import { request } from '@/remote/activitypub/request.js';
import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js';
import Logger from '@/services/logger.js'; import Logger from '@/services/logger.js';
import { Instances } from '@/models/index.js'; import { Instances } from '@/models/index.js';

View file

@ -4,7 +4,7 @@ import { User } from '@/models/entities/user.js';
import { getResponse } from '@/misc/fetch.js'; import { getResponse } from '@/misc/fetch.js';
import { createSignedPost, createSignedGet } from './ap-request.js'; import { createSignedPost, createSignedGet } from './ap-request.js';
export default async (user: { id: User['id'] }, url: string, object: any) => { export async function request(user: { id: User['id'] }, url: string, object: any): Promise<void> {
const body = JSON.stringify(object); const body = JSON.stringify(object);
const keypair = await getUserKeypair(user.id); const keypair = await getUserKeypair(user.id);