mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Sampling API error report rate
This commit is contained in:
@ -28,8 +28,7 @@ const subscribe = async ({
|
||||
return apiTooot({
|
||||
method: 'post',
|
||||
url: `/push/subscribe/${expoToken}/${instanceUrl}/${accountId}`,
|
||||
body: { accountFull, serverKey, auth },
|
||||
sentry: true
|
||||
body: { accountFull, serverKey, auth }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,7 @@ const pushUnregister = async (state: RootState, expoToken: string) => {
|
||||
|
||||
await apiTooot<{ endpoint: string; publicKey: string; auth: string }>({
|
||||
method: 'delete',
|
||||
url: `/push/unsubscribe/${expoToken}/${instance.url}/${instance.account.id}`,
|
||||
sentry: true
|
||||
url: `/push/unsubscribe/${expoToken}/${instance.url}/${instance.account.id}`
|
||||
})
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
|
@ -21,20 +21,19 @@ export const updateInstancePushDecode = createAsyncThunk(
|
||||
}
|
||||
|
||||
const expoToken = isDevelopment
|
||||
? 'DEVELOPMENT_TOKEN_1'
|
||||
: (
|
||||
await Notifications.getExpoPushTokenAsync({
|
||||
experienceId: '@xmflsct/tooot'
|
||||
})
|
||||
).data
|
||||
? 'DEVELOPMENT_TOKEN_1'
|
||||
: (
|
||||
await Notifications.getExpoPushTokenAsync({
|
||||
experienceId: '@xmflsct/tooot'
|
||||
})
|
||||
).data
|
||||
|
||||
await apiTooot({
|
||||
method: 'put',
|
||||
url: `/push/update-decode/${expoToken}/${instance.url}/${instance.account.id}`,
|
||||
body: {
|
||||
auth: !disable ? null : instance.push.keys.auth
|
||||
},
|
||||
sentry: true
|
||||
}
|
||||
})
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
|
Reference in New Issue
Block a user