diff options
Diffstat (limited to 'shared/extra-utils/custom-pages/custom-pages.ts')
-rw-r--r-- | shared/extra-utils/custom-pages/custom-pages.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/shared/extra-utils/custom-pages/custom-pages.ts b/shared/extra-utils/custom-pages/custom-pages.ts deleted file mode 100644 index bf2d16c70..000000000 --- a/shared/extra-utils/custom-pages/custom-pages.ts +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
2 | import { makeGetRequest, makePutBodyRequest } from '../requests/requests' | ||
3 | |||
4 | function getInstanceHomepage (url: string, statusCodeExpected = HttpStatusCode.OK_200) { | ||
5 | const path = '/api/v1/custom-pages/homepage/instance' | ||
6 | |||
7 | return makeGetRequest({ | ||
8 | url, | ||
9 | path, | ||
10 | statusCodeExpected | ||
11 | }) | ||
12 | } | ||
13 | |||
14 | function updateInstanceHomepage (url: string, token: string, content: string) { | ||
15 | const path = '/api/v1/custom-pages/homepage/instance' | ||
16 | |||
17 | return makePutBodyRequest({ | ||
18 | url, | ||
19 | path, | ||
20 | token, | ||
21 | fields: { content }, | ||
22 | statusCodeExpected: HttpStatusCode.NO_CONTENT_204 | ||
23 | }) | ||
24 | } | ||
25 | |||
26 | // --------------------------------------------------------------------------- | ||
27 | |||
28 | export { | ||
29 | getInstanceHomepage, | ||
30 | updateInstanceHomepage | ||
31 | } | ||