Skip to content

Commit

Permalink
Fix user api url issue (#153)
Browse files Browse the repository at this point in the history
Signed-off-by: SayedTahsin <[email protected]>
  • Loading branch information
SayedTahsin authored Jul 9, 2024
1 parent d25f508 commit 4a362ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions layouts/_default/embed_console.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
else
acSignInButton.setAttribute('href', 'https://appscode.com/accounts/user/login');


const urlParams = new URLSearchParams(window.location.search);
const color = urlParams.get('color');
const text = urlParams.get('text');
Expand Down Expand Up @@ -146,12 +145,12 @@
const protocol = window.location.protocol;
const port = window.location.port;

const apiDomain = protocol + "//" + hostname + (port? ":3003" : "") + '/api';
const apiDomain = protocol + "//" + hostname + (port? ":3003" : "") + '/api/v1';
const consoleDomain = protocol + "//" + hostname + (port? ":5990" : "") + '/console';

acSignInButton.classList.add('is-loading');

const response = await fetch(apiDomain + "/api/v1/user", {
const response = await fetch(apiDomain + "/user", {
method: "GET",
credentials: "include",
headers: {
Expand Down

0 comments on commit 4a362ff

Please sign in to comment.