export function useApiTokenService() {
    const api = useApi()

    async function regenerate(): Promise<string> {
        const data = await api.post<{ apiToken: string }>('/me/regenerate-api-token', {}, {
            toast: false,
        })
        return data.apiToken
    }

    return { regenerate }
}
