
* fix: update to latest sapper fixes #416 * fix error and debug pages * requestIdleCallback makes column switching feel way nicer than double rAF * add export feature * add better csp info * workaround for sapper sub-page issue * clarify in readme about exporting * fix now config * switch from rIC to triple raf * style-loader is no longer used * update theming guide
12 lines
580 B
JavaScript
12 lines
580 B
JavaScript
import { post, WRITE_TIMEOUT, paramsString, del } from '../_utils/ajax'
|
|
import { auth, basename } from './utils'
|
|
|
|
export async function blockDomain (instanceName, accessToken, domain) {
|
|
let url = `${basename(instanceName)}/api/v1/domain_blocks?${paramsString({ domain })}`
|
|
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
|
|
}
|
|
|
|
export async function unblockDomain (instanceName, accessToken, domain) {
|
|
let url = `${basename(instanceName)}/api/v1/domain_blocks?${paramsString({ domain })}`
|
|
return del(url, auth(accessToken), { timeout: WRITE_TIMEOUT })
|
|
}
|