From 10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 3 Jun 2021 17:33:44 +0200 Subject: Move middleware utils in middlewares helpers modules should not import models --- server/helpers/actor.ts | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 server/helpers/actor.ts (limited to 'server/helpers/actor.ts') diff --git a/server/helpers/actor.ts b/server/helpers/actor.ts deleted file mode 100644 index 5f742505b..000000000 --- a/server/helpers/actor.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { ActorModel } from '../models/actor/actor' -import { MActorAccountChannelId, MActorFull } from '../types/models' - -type ActorFetchByUrlType = 'all' | 'association-ids' - -function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType): Promise { - if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url) - - if (fetchType === 'association-ids') return ActorModel.loadByUrl(url) -} - -export { - ActorFetchByUrlType, - fetchActorByUrl -} -- cgit v1.2.3