Browse Source

hotfix: change api url

master
Rafael Gomes 7 months ago
parent
commit
31bfd66f6b
  1. 2
      src/app.json
  2. 8
      src/app/api/auth.js
  3. 4
      src/app/auth/authClient.js

2
src/app.json

@ -53,7 +53,7 @@
}, },
"extra": { "extra": {
"eas": { "eas": {
"projectId": "b8b2fec9-954d-41ab-99cb-b7fb4e4504ad"
"projectId": "4bb98e5e-a03a-4528-9db4-896750605608"
} }
} }
} }

8
src/app/api/auth.js

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

4
src/app/auth/authClient.js

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