new relic debug + new oauth2 endpoints

This commit is contained in:
Gustavo Fuhr 2022-12-12 19:29:31 -03:00
parent cff2b6a652
commit c561aa305f
3 changed files with 10 additions and 2 deletions

View File

@ -640,7 +640,7 @@ export default class RestClient implements Client {
reject: (error: ErrorInfo) => void,
) => {
this.axios
.post(`${this.baseUrl}/service/users/googleCallback?code=${code}`, {
.post(`${this.baseUrl}/service/oauth2/googlecallback?code=${code}`, {
headers: { 'Content-Type': 'application/json' },
})
.then((response) => {
@ -661,7 +661,7 @@ export default class RestClient implements Client {
confirmAccountSync(email: string, code: string): Promise<void> {
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
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' },
})
.then(() => {

View File

@ -53,6 +53,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
.catch((error) => {
console.log('ERROR', error);
setCallbackError(true);
window.newrelic?.noticeError(error);
});
}, []);
@ -64,6 +65,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
})
.catch((error) => {
console.log('ERROR', error);
window.newrelic?.noticeError(error);
});
};

View File

@ -4,6 +4,12 @@ import React from 'react';
import App from './app';
import { createRoot } from 'react-dom/client';
declare global {
interface Window {
newrelic: { noticeError: (Error) => void };
}
}
const container = document.getElementById('root') as HTMLElement;
const root = createRoot(container!);
root.render(<App />);