You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
966 B
42 lines
966 B
import { defHttp } from '/@/utils/http/axios';
|
|
import {
|
|
UserFriend,
|
|
FriendCreateRequest,
|
|
FriendAddRequest,
|
|
GetMyFriendsRequest,
|
|
GetMyFriendsPagedRequest,
|
|
} from './model';
|
|
|
|
export const create = (input: FriendCreateRequest) => {
|
|
return defHttp.post<void>({
|
|
url: '/api/im/my-friends',
|
|
data: input,
|
|
});
|
|
};
|
|
|
|
export const addFriend = (input: FriendAddRequest) => {
|
|
return defHttp.post<void>({
|
|
url: '/api/im/my-friends/add-request',
|
|
data: input,
|
|
});
|
|
};
|
|
|
|
export const getByFriendId = (friendId: string) => {
|
|
return defHttp.get<UserFriend>({
|
|
url: `/api/im/my-friends/${friendId}`,
|
|
});
|
|
};
|
|
|
|
export const getList = (input: GetMyFriendsPagedRequest) => {
|
|
return defHttp.get<PagedResultDto<UserFriend>>({
|
|
url: '/api/im/my-friends',
|
|
params: input,
|
|
});
|
|
};
|
|
|
|
export const getAll = (input: GetMyFriendsRequest) => {
|
|
return defHttp.get<ListResultDto<UserFriend>>({
|
|
url: '/api/im/my-friends/all',
|
|
params: input,
|
|
});
|
|
};
|
|
|