MCPcopy Create free account
hub / github.com/AntiHub-Project/AntiHub / updateAccountType

Function updateAccountType

lib/api.ts:707–726  ·  view source on GitHub ↗
(cookieId: string, isShared: number)

Source from the content-addressed store, hash-verified

705 * @param isShared 账号类型:0=专属,1=共享
706 */
707export async function updateAccountType(cookieId: string, isShared: number): Promise<{
708 cookie_id: string;
709 is_shared: number;
710}> {
711 const result = await fetchWithAuth<{
712 success: boolean;
713 message: string;
714 data: {
715 cookie_id: string;
716 is_shared: number;
717 };
718 }>(
719 `${API_BASE_URL}/api/plugin-api/accounts/${cookieId}/type`,
720 {
721 method: 'PUT',
722 body: JSON.stringify({ is_shared: isShared }),
723 }
724 );
725 return result.data;
726}
727
728/**
729 * 更新账号名称

Callers 1

handleToggleAccountTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected