You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/shared/model/friend.ts

22 lines
388 B
TypeScript

import { request } from '../api/request';
export interface FriendRequest {
from: string;
to: string;
message: string;
}
/**
* 发送好友请求
* @param targetId 目标用户id
*/
export async function addFriendRequest(
targetId: string
): Promise<FriendRequest> {
const { data } = await request.post('/api/friend/request/add', {
to: targetId,
});
return data;
}