(cookieId: string, isShared: number)
| 705 | * @param isShared 账号类型:0=专属,1=共享 |
| 706 | */ |
| 707 | export 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 | * 更新账号名称 |
no outgoing calls
no test coverage detected