mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change client request time to client time zone offset
This commit is contained in:
parent
cff2396bd1
commit
1b6dab32bf
@ -10,7 +10,7 @@ const authLink = new ApolloLink((operation, forward) => {
|
||||
operation.setContext({
|
||||
headers: {
|
||||
Authorization: token && token.length > 0 ? `Bearer ${token}` : '',
|
||||
clientRequestTime: new Date().toString(),
|
||||
clientTimezoneOffset: new Date().getTimezoneOffset(),
|
||||
},
|
||||
})
|
||||
return forward(operation).map((response) => {
|
||||
|
||||
@ -94,7 +94,7 @@ describe('apolloProvider', () => {
|
||||
expect(setContextMock).toBeCalledWith({
|
||||
headers: {
|
||||
Authorization: 'Bearer some-token',
|
||||
clientRequestTime: expect.any(String),
|
||||
clientTimezoneOffset: expect.any(Number),
|
||||
},
|
||||
})
|
||||
})
|
||||
@ -110,7 +110,7 @@ describe('apolloProvider', () => {
|
||||
expect(setContextMock).toBeCalledWith({
|
||||
headers: {
|
||||
Authorization: '',
|
||||
clientRequestTime: expect.any(String),
|
||||
clientTimezoneOffset: expect.any(Number),
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user