feat(web): add banned users section in chat info moderation
Some checks failed
CI / test (push) Failing after 2m12s
Some checks failed
CI / test (push) Failing after 2m12s
This commit is contained in:
@@ -2,6 +2,7 @@ import { http } from "./http";
|
||||
import type {
|
||||
Chat,
|
||||
ChatAttachment,
|
||||
ChatBan,
|
||||
ChatDetail,
|
||||
ChatInviteLink,
|
||||
ChatMember,
|
||||
@@ -299,6 +300,11 @@ export async function listChatMembers(chatId: number): Promise<ChatMember[]> {
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function listChatBans(chatId: number): Promise<ChatBan[]> {
|
||||
const { data } = await http.get<ChatBan[]>(`/chats/${chatId}/bans`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function updateChatTitle(chatId: number, title: string): Promise<Chat> {
|
||||
const { data } = await http.patch<Chat>(`/chats/${chatId}/title`, { title });
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user