1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-01 15:46:40 +07:00

periodical fetching updates

This commit is contained in:
Fedor Katurov 2019-11-12 17:59:40 +07:00
parent 32a2a0567e
commit 6c1f8967e8
8 changed files with 52 additions and 3 deletions
src/redux/auth

View file

@ -50,3 +50,12 @@ export const apiAuthSendMessage = ({
.post(API.USER.MESSAGE_SEND(username), { message }, configWithToken(access))
.then(resultMiddleware)
.catch(errorMiddleware);
export const apiAuthGetUpdates = ({
access,
exclude_dialogs,
}): Promise<IResultWithStatus<{ message: IMessage }>> =>
api
.get(API.USER.GET_UPDATES, configWithToken(access, { params: { exclude_dialogs } }))
.then(resultMiddleware)
.catch(errorMiddleware);