Commit ecbabcd5 by HaOuiha

authorization subscription

parent 50ce3fdc
......@@ -206,6 +206,7 @@ class TimerScreen extends PureComponent {
.month(0)
.date(0)
.second(0)
.tz('Asia/Bangkok')
.valueOf()
);
......
......@@ -22,9 +22,10 @@ const wsLink = new WebSocketLink({
uri: `wss://${BASE_URL}/graphql`,
options: {
reconnect: true,
// connectionParams: {
// headers: { Authorization: `Bearer ${T}` },
// },
connectionParams: async () => {
const token = await AsyncStorage.getItem('token');
return { authorization: `Bearer ${token}` };
},
},
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment