mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2025-01-03 16:53:50 +01:00
new relic debug + new oauth2 endpoints
This commit is contained in:
parent
cff2b6a652
commit
c561aa305f
@ -640,7 +640,7 @@ export default class RestClient implements Client {
|
|||||||
reject: (error: ErrorInfo) => void,
|
reject: (error: ErrorInfo) => void,
|
||||||
) => {
|
) => {
|
||||||
this.axios
|
this.axios
|
||||||
.post(`${this.baseUrl}/service/users/googleCallback?code=${code}`, {
|
.post(`${this.baseUrl}/service/oauth2/googlecallback?code=${code}`, {
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -661,7 +661,7 @@ export default class RestClient implements Client {
|
|||||||
confirmAccountSync(email: string, code: string): Promise<void> {
|
confirmAccountSync(email: string, code: string): Promise<void> {
|
||||||
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
||||||
this.axios
|
this.axios
|
||||||
.put(`${this.baseUrl}/service/users/confirmAccountSync?email=${email}&code=${code}`, {
|
.put(`${this.baseUrl}/service/oauth2/confirmaccountsync?email=${email}&code=${code}`, {
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -53,6 +53,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('ERROR', error);
|
console.log('ERROR', error);
|
||||||
setCallbackError(true);
|
setCallbackError(true);
|
||||||
|
window.newrelic?.noticeError(error);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('ERROR', error);
|
console.log('ERROR', error);
|
||||||
|
window.newrelic?.noticeError(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,6 +4,12 @@ import React from 'react';
|
|||||||
import App from './app';
|
import App from './app';
|
||||||
import { createRoot } from 'react-dom/client';
|
import { createRoot } from 'react-dom/client';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
newrelic: { noticeError: (Error) => void };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const container = document.getElementById('root') as HTMLElement;
|
const container = document.getElementById('root') as HTMLElement;
|
||||||
const root = createRoot(container!);
|
const root = createRoot(container!);
|
||||||
root.render(<App />);
|
root.render(<App />);
|
||||||
|
Loading…
Reference in New Issue
Block a user