Final test for new push system

This commit is contained in:
Zhiyuan Zheng 2021-12-12 22:09:18 +01:00
parent d2ce0aafe8
commit e2c5e173d5
3 changed files with 5 additions and 9 deletions

View File

@ -25,12 +25,8 @@ const pushUseConnect = ({ mode, t, instances, dispatch }: Params) => {
).data ).data
apiTooot({ apiTooot({
method: 'post', method: 'get',
service: 'push', url: `push/connect/${expoToken}`,
url: 'connect',
body: {
expoToken
},
sentry: true sentry: true
}).catch(error => { }).catch(error => {
if (error.status == 410) { if (error.status == 410) {
@ -76,7 +72,7 @@ const pushUseConnect = ({ mode, t, instances, dispatch }: Params) => {
const pushEnabled = instances.filter(instance => instance.push.global.value) const pushEnabled = instances.filter(instance => instance.push.global.value)
if (pushEnabled.length) { if (pushEnabled.length) {
// connect() connect()
} }
}, [instances]) }, [instances])
} }

View File

@ -77,7 +77,7 @@ const pushRegister = async (
accountId, accountId,
accountFull, accountFull,
serverKey: res.body.server_key, serverKey: res.body.server_key,
auth auth: instancePush.decode.value === false ? null : auth
}) })
if (Platform.OS === 'android') { if (Platform.OS === 'android') {

View File

@ -29,7 +29,7 @@ export const updateInstancePushDecode = createAsyncThunk(
method: 'put', method: 'put',
url: `/push/update-decode/${expoToken}/${instance.url}/${instance.account.id}`, url: `/push/update-decode/${expoToken}/${instance.url}/${instance.account.id}`,
body: { body: {
auth: disable ? null : instance.push.keys.auth auth: !disable ? null : instance.push.keys.auth
}, },
sentry: true sentry: true
}) })