Browse Source

update URL API

master
Rafael Bantu 9 months ago
parent
commit
9ae470f39d
  1. 6
      src/app/api/auth.js
  2. 2
      src/app/api/client.js
  3. 4
      src/app/auth/authClient.js

6
src/app/api/auth.js

@ -47,7 +47,7 @@ function signup({
async function userPersonalData() {
const authToken = await authStorage.getToken();
const localClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/auth/users",
baseURL: "https://wpdauth.cemaden.gov.br/auth/users",
});
localClient.setHeader("Authorization", `Bearer ${authToken}`);
@ -61,7 +61,7 @@ async function userActivation(code) {
// console.log("USER NAME: " + username);
const localClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/auth/users",
baseURL: "https://wpdauth.cemaden.gov.br/auth/users",
});
localClient.setHeader("Authorization", `Bearer ${authToken}`);
@ -97,7 +97,7 @@ function loginByUsernamAnswers(username, secQuestionId, secQuestionAnswer) {
function updatePassword(authToken, username, password) {
const localClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/auth/forgotpasswords",
baseURL: "https://wpdauth.cemaden.gov.br/auth/forgotpasswords",
});
localClient.setHeader("Authorization", `Bearer ${authToken}`);

2
src/app/api/client.js

@ -3,7 +3,7 @@ import { useCallback } from "react";
import cache from "../utility/cache";
const apiClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/api",
baseURL: "https://wpdauth.cemaden.gov.br/api",
});
const get = apiClient.get;

4
src/app/auth/authClient.js

@ -1,11 +1,11 @@
import { create } from "apisauce";
const authClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/auth/users",
baseURL: "https://wpdauth.cemaden.gov.br/auth/users",
});
const authChangePswdClient = create({
baseURL: "https://wpd.brazilsouth.cloudapp.azure.com/auth/forgotpasswords"
baseURL: "https://wpdauth.cemaden.gov.br/auth/forgotpasswords"
})
export { authClient, authChangePswdClient};
Loading…
Cancel
Save