Add custom UI project to ABP framework created with angular

24 Views Asked by At

I am using Abp framework template, I downloaded the startup project with angular UI and it works fine on the local environment and production environment, But now I need to add new project to my application I need to add New UI project with Nuxt, I create my project and write the code which connects to the API backend from Abp template, First thing I try it the login API, it works fine in my local environment But once I go to production environment the login not works Here is my code in the login page

const {
    data: login,
    pending: loginPendingVar,
    error: loginErrorVar,
  } = await $api.account.Login(body, {
    server: false,
  });
  var result = toRaw(login);
  if (result.value) {
    if (result.value.result == 1) {
      authStore.Setstatus(
        <string>useCookie(".AspNetCore.Identity.Application").value
      );
      permissionStore.Setstatus();  
      home();
    } else {
      logginFaild.value = true;
      logginFaildMessage.value = tm(result.value.description); //result.value.description;
    }
  }

The login API URL I connect to it is :{My API URL}/api/account/login When I try to login on production environment I got 404 and here the text on log file

2024-03-21 13:12:12.183 +00:00 [INF] Request starting HTTP/2 OPTIONS {My API URL}/api/app/account/login - null null
2024-03-21 13:12:12.184 +00:00 [INF] CORS policy execution successful.
2024-03-21 13:12:12.184 +00:00 [INF] Request finished HTTP/2 OPTIONS {My API URL}/api/app/account/login - 204 null null 2.0945ms
2024-03-21 13:12:12.341 +00:00 [INF] Request starting HTTP/2 POST {My API URL}/api/app/account/login - application/json 74
2024-03-21 13:12:12.342 +00:00 [INF] CORS policy execution successful.
2024-03-21 13:12:12.359 +00:00 [INF] Request finished HTTP/2 POST {My API URL}/api/app/account/login - 302 null null 17.7703ms
2024-03-21 13:12:12.359 +00:00 [INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: POST {My API URL}/api/app/account/login, Response status code: 302
2024-03-21 13:12:12.518 +00:00 [INF] Request starting HTTP/2 OPTIONS {My API URL}/Error?httpStatusCode=404 - null null
2024-03-21 13:12:12.518 +00:00 [INF] CORS policy execution successful.
2024-03-21 13:12:12.519 +00:00 [INF] Request finished HTTP/2 OPTIONS {My API URL}/Error?httpStatusCode=404 - 204 null null 0.7684ms
2024-03-21 13:12:12.678 +00:00 [INF] Request starting HTTP/2 GET {My API URL}/Error?httpStatusCode=404 - application/json null
2024-03-21 13:12:12.679 +00:00 [INF] CORS policy execution successful.
2024-03-21 13:12:12.683 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'
2024-03-21 13:12:12.683 +00:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared).
2024-03-21 13:12:12.688 +00:00 [INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml.
2024-03-21 13:12:12.702 +00:00 [INF] Executed ViewResult - view ~/Views/Error/Default.cshtml executed in 13.7539ms.
2024-03-21 13:12:12.702 +00:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 18.7199ms
2024-03-21 13:12:12.702 +00:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'
2024-03-21 13:12:12.702 +00:00 [INF] Request finished HTTP/2 GET {My API URL}/Error?httpStatusCode=404 - 404 null text/html; charset=utf-8 24.4567ms

Any help with this issue

0

There are 0 best solutions below