New payouts system (#1456)

* initial

* finish withdraw page

* Finish frontend

* Fix UI a bit

* tester fixes
This commit is contained in:
Geometrically
2023-12-05 12:13:27 -07:00
committed by GitHub
parent 1f58aebb2b
commit 2d14e5682d
16 changed files with 691 additions and 670 deletions

View File

@@ -103,3 +103,27 @@ export const getAuthUrl = (provider, redirect = '') => {
return `${config.public.apiBaseUrl}auth/init?url=${fullURL}&provider=${provider}`
}
export const removeAuthProvider = async (provider) => {
startLoading()
try {
const auth = await useAuth()
await useBaseFetch('auth/provider', {
method: 'DELETE',
body: {
provider,
},
})
await useAuth(auth.value.token)
} catch (err) {
const data = useNuxtApp()
data.$notify({
group: 'main',
title: 'An error occurred',
text: err.data.description,
type: 'error',
})
}
stopLoading()
}