-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathinfoHelper.ts
More file actions
51 lines (49 loc) · 1.58 KB
/
infoHelper.ts
File metadata and controls
51 lines (49 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import axios, { AxiosResponse } from 'axios'
import { TestConstants } from '../TestConstants'
export const setMaxEmbargoDurationInMonthsViaApi = async (
maxEmbargoDurationInMonths: number
): Promise<AxiosResponse> => {
return await axios.put(
`${TestConstants.TEST_API_URL}/admin/settings/:MaxEmbargoDurationInMonths`,
maxEmbargoDurationInMonths.toString(),
{
headers: { 'Content-Type': 'text/plain' }
}
)
}
export const setApplicationTermsOfUseViaApi = async (
applicationTermsOfUse: string
): Promise<AxiosResponse> => {
return await axios.put(
`${TestConstants.TEST_API_URL}/admin/settings/:ApplicationTermsOfUse`,
applicationTermsOfUse,
{
headers: { 'Content-Type': 'text/plain' }
}
)
}
export const setDatasetPublishPopupCustomTextViaApi = async (
datasetPublishPopupCustomText: string
): Promise<AxiosResponse> => {
return await axios.put(
`${TestConstants.TEST_API_URL}/admin/settings/:DatasetPublishPopupCustomText`,
datasetPublishPopupCustomText,
{
headers: { 'Content-Type': 'text/plain' }
}
)
}
export const setPublishDatasetDisclaimerTextViaApi = async (
publishDatasetDisclaimerText: string
): Promise<AxiosResponse> => {
return await axios.put(
`${TestConstants.TEST_API_URL}/admin/settings/:PublishDatasetDisclaimerText`,
publishDatasetDisclaimerText,
{
headers: { 'Content-Type': 'text/plain' }
}
)
}
export const deleteApplicationTermsOfUseViaApi = async (): Promise<AxiosResponse> => {
return await axios.delete(`${TestConstants.TEST_API_URL}/admin/settings/:ApplicationTermsOfUse`)
}