Fix a mutation that should have been a query
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b2a40d15fa
commit
98b8b3338c
@ -158,7 +158,7 @@ export const PRIVACY = gql`
|
||||
`;
|
||||
|
||||
export const TIMEZONES = gql`
|
||||
query {
|
||||
query Timezones {
|
||||
config {
|
||||
timezones
|
||||
}
|
||||
@ -166,7 +166,7 @@ export const TIMEZONES = gql`
|
||||
`;
|
||||
|
||||
export const WEB_PUSH = gql`
|
||||
query {
|
||||
query WebPush {
|
||||
config {
|
||||
webPush {
|
||||
enabled
|
||||
|
@ -22,8 +22,8 @@ export async function subscribeUserToPush(): Promise<PushSubscription | null> {
|
||||
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
||||
|
||||
const registration = await navigator.serviceWorker.ready;
|
||||
const { data } = await client.mutate<{ config: IConfig }>({
|
||||
mutation: WEB_PUSH,
|
||||
const { data } = await client.query<{ config: IConfig }>({
|
||||
query: WEB_PUSH,
|
||||
});
|
||||
|
||||
if (data?.config?.webPush?.enabled && data?.config?.webPush?.publicKey) {
|
||||
|
Loading…
Reference in New Issue
Block a user