mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
getting messages diff
This commit is contained in:
parent
e1117a0d91
commit
d935e9de42
8 changed files with 87 additions and 17 deletions
|
@ -5,9 +5,16 @@ import { API } from '~/constants/api';
|
|||
export const apiMessagesGetUserMessages = ({
|
||||
access,
|
||||
username,
|
||||
after,
|
||||
before,
|
||||
}: {
|
||||
access: string;
|
||||
username: string;
|
||||
after?: string;
|
||||
before?: string;
|
||||
}): Promise<IResultWithStatus<{ messages: IMessage[] }>> =>
|
||||
api
|
||||
.get(API.USER.MESSAGES(username), configWithToken(access))
|
||||
.get(API.USER.MESSAGES(username), configWithToken(access, { params: { after, before } }))
|
||||
.then(resultMiddleware)
|
||||
.catch(errorMiddleware);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue