aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/actors/actors.ts18
-rw-r--r--shared/extra-utils/index.ts1
2 files changed, 19 insertions, 0 deletions
diff --git a/shared/extra-utils/actors/actors.ts b/shared/extra-utils/actors/actors.ts
new file mode 100644
index 000000000..4a4aba775
--- /dev/null
+++ b/shared/extra-utils/actors/actors.ts
@@ -0,0 +1,18 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import { makeGetRequest } from '../requests/requests'
4import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
5
6function getActor (url: string, actorName: string, statusCodeExpected = HttpStatusCode.OK_200) {
7 const path = '/api/v1/actors/' + actorName
8
9 return makeGetRequest({
10 url,
11 path,
12 statusCodeExpected
13 })
14}
15
16export {
17 getActor
18}
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts
index 898a92d43..5c520d0c2 100644
--- a/shared/extra-utils/index.ts
+++ b/shared/extra-utils/index.ts
@@ -1,3 +1,4 @@
1export * from './actors/actors'
1export * from './bulk/bulk' 2export * from './bulk/bulk'
2export * from './cli/cli' 3export * from './cli/cli'
3export * from './feeds/feeds' 4export * from './feeds/feeds'