mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Correct app details
This commit is contained in:
@ -14,7 +14,6 @@ export interface Props {
|
||||
|
||||
const InstanceAuth = React.memo(
|
||||
({ instanceDomain, appData, goBack }: Props) => {
|
||||
console.log(Constants.manifest.releaseChannel)
|
||||
let redirectUri: string
|
||||
switch (Constants.manifest.releaseChannel) {
|
||||
case 'production':
|
||||
|
@ -1,15 +1,29 @@
|
||||
import client from '@api/client'
|
||||
import { AxiosError } from 'axios'
|
||||
import Constants from 'expo-constants'
|
||||
import { useQuery, UseQueryOptions } from 'react-query'
|
||||
|
||||
export type QueryKey = ['Apps', { instanceDomain?: string }]
|
||||
|
||||
const queryFunction = ({ queryKey }: { queryKey: QueryKey }) => {
|
||||
let redirectUri: string
|
||||
switch (Constants.manifest.releaseChannel) {
|
||||
case 'production':
|
||||
case 'staging':
|
||||
case 'testing':
|
||||
redirectUri = 'tooot://expo-auth-session'
|
||||
break
|
||||
default:
|
||||
redirectUri = 'exp://127.0.0.1:19000'
|
||||
break
|
||||
}
|
||||
|
||||
const { instanceDomain } = queryKey[1]
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('client_name', 'test_dudu')
|
||||
formData.append('redirect_uris', 'exp://127.0.0.1:19000')
|
||||
formData.append('client_name', 'tooot📱')
|
||||
formData.append('website', 'https://tooot.app')
|
||||
formData.append('redirect_uris', redirectUri)
|
||||
formData.append('scopes', 'read write follow push')
|
||||
|
||||
return client<Mastodon.Apps>({
|
||||
|
Reference in New Issue
Block a user