mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-02 16:16:41 +07:00
fetching backend stats
This commit is contained in:
parent
d260325592
commit
be3401a4e5
5 changed files with 46 additions and 8 deletions
|
@ -1,3 +1,13 @@
|
|||
import git from '~/stats/git.json';
|
||||
import { API } from '~/constants/api';
|
||||
import { api, resultMiddleware, errorMiddleware } from '~/utils/api';
|
||||
import { IBorisState, IStatBackend } from './reducer';
|
||||
import { IResultWithStatus } from '../types';
|
||||
|
||||
export const getBorisGitStats = (): Promise<any> => Promise.resolve(git);
|
||||
export const getBorisGitStats = (): Promise<IBorisState['stats']['git']> => Promise.resolve(git);
|
||||
|
||||
export const getBorisBackendStats = (): Promise<IResultWithStatus<IStatBackend>> =>
|
||||
api
|
||||
.get(API.BORIS.GET_BACKEND_STATS)
|
||||
.then(resultMiddleware)
|
||||
.catch(errorMiddleware);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue