Download desktop/src/api/h5Access.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 810 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/h5Access.ts
- Command line
-
hf download hf://chenbhao/codev@e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/h5Access.ts
-
curl -L -o h5Access.ts https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/h5Access.ts
810 Bytes
| import { api } from './client' | |
| import type { H5AccessSettings } from '../types/settings' | |
| export type { H5AccessSettings } from '../types/settings' | |
| export type H5AccessStatus = { | |
| settings: H5AccessSettings | |
| } | |
| export type H5AccessTokenResult = { | |
| settings: H5AccessSettings | |
| token: string | |
| } | |
| export const h5AccessApi = { | |
| get() { | |
| return api.get<H5AccessStatus>('/api/h5-access') | |
| }, | |
| enable() { | |
| return api.post<H5AccessTokenResult>('/api/h5-access/enable') | |
| }, | |
| disable() { | |
| return api.post<H5AccessStatus>('/api/h5-access/disable') | |
| }, | |
| regenerate() { | |
| return api.post<H5AccessTokenResult>('/api/h5-access/regenerate') | |
| }, | |
| update(input: { | |
| allowedOrigins?: string[] | |
| publicBaseUrl?: string | null | |
| }) { | |
| return api.put<H5AccessStatus>('/api/h5-access', input) | |
| }, | |
| } | |